Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -13,6 +13,9 @@ FROM tiangolo/uvicorn-gunicorn-fastapi:python3.10-slim
|
|
13 |
# Set the port to a non-privileged one, standard for Hugging Face
|
14 |
ENV PORT=7860
|
15 |
|
|
|
|
|
|
|
16 |
# Set the working directory inside the container
|
17 |
WORKDIR /app
|
18 |
|
@@ -27,4 +30,4 @@ RUN pip install --no-cache-dir --upgrade pip && \
|
|
27 |
# Copy the main application code
|
28 |
COPY main.py .
|
29 |
|
30 |
-
# The base image automatically finds and runs the FastAPI app from main.py
|
|
|
13 |
# Set the port to a non-privileged one, standard for Hugging Face
|
14 |
ENV PORT=7860
|
15 |
|
16 |
+
# ↓↓↓ Add this line to control worker count and timeout ↓↓↓
|
17 |
+
ENV GUNICORN_CMD_ARGS="--workers=2 --timeout=90"
|
18 |
+
|
19 |
# Set the working directory inside the container
|
20 |
WORKDIR /app
|
21 |
|
|
|
30 |
# Copy the main application code
|
31 |
COPY main.py .
|
32 |
|
33 |
+
# The base image automatically finds and runs the FastAPI app from main.py
|