Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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 |
-
|
| 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"]
|
|
|