rohanshaw commited on
Commit
f6f42ee
·
verified ·
1 Parent(s): 1b0dcab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -7
Dockerfile CHANGED
@@ -1,18 +1,12 @@
1
- # 1. Use an official Python image
2
  FROM python:3.11-slim
3
 
4
- # 2. Set the working directory inside the container
5
  WORKDIR /code
6
 
7
- # 3. Copy the requirements file and install dependencies
8
  COPY ./requirements.txt /code/requirements.txt
9
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
 
11
- # 4. Copy the rest of your application code
12
  COPY ./app /code/app
13
 
14
- # 5. HF requires exposing port 7860 (default)
15
  EXPOSE 7860
16
 
17
- # 6. Run using the dynamically assigned HF port
18
- CMD ["sh", "-c", "gunicorn -k uvicorn.workers.UvicornWorker -w 4 -b 0.0.0.0:${PORT} app.main:app"]
 
 
1
  FROM python:3.11-slim
2
 
 
3
  WORKDIR /code
4
 
 
5
  COPY ./requirements.txt /code/requirements.txt
6
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
7
 
 
8
  COPY ./app /code/app
9
 
 
10
  EXPOSE 7860
11
 
12
+ CMD ["sh", "-c", "gunicorn -k uvicorn.workers.UvicornWorker -w 4 -b 0.0.0.0:${PORT:-7860} app.main:app"]