tuan243 commited on
Commit
76d1dc4
·
verified ·
1 Parent(s): 9bb19ba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -5,12 +5,12 @@ RUN pwd && ls -l
5
  # Create a user with UID 1000
6
  RUN useradd -m -u 1000 user
7
 
8
- # Copy the requirements file to the /code directory
9
- COPY ./requirements.txt /code/requirements.txt
10
-
11
  # Install PyTorch
12
  RUN pip install torch torchvision torchaudio
13
 
 
 
 
14
  # Install the Python dependencies with root and clean up cache
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt && rm -rf /root/.cache
16
 
@@ -32,4 +32,4 @@ WORKDIR /home/user
32
  RUN pwd && ls -l
33
 
34
  # Start the application using gunicorn
35
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "--timeout", "300", "main:app"]
 
5
  # Create a user with UID 1000
6
  RUN useradd -m -u 1000 user
7
 
 
 
 
8
  # Install PyTorch
9
  RUN pip install torch torchvision torchaudio
10
 
11
+ # Copy the requirements file to the /code directory
12
+ COPY ./requirements.txt /code/requirements.txt
13
+
14
  # Install the Python dependencies with root and clean up cache
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt && rm -rf /root/.cache
16
 
 
32
  RUN pwd && ls -l
33
 
34
  # Start the application using gunicorn
35
+ CMD ["gunicorn", "main:app", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:7860", "--timeout", "300"]