Update Dockerfile
Browse files- Dockerfile +2 -7
Dockerfile
CHANGED
|
@@ -5,7 +5,7 @@ FROM python:3.10-slim
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Install system dependencies (optional, depending on the need for certain Python packages)
|
| 8 |
-
RUN apt-get update && apt-get install -y build-essential git && rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Copy all project files into the working directory
|
| 11 |
COPY . .
|
|
@@ -14,9 +14,4 @@ COPY . .
|
|
| 14 |
RUN pip install --upgrade pip && \
|
| 15 |
pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
EXPOSE 8000
|
| 19 |
-
|
| 20 |
-
# Run the FastAPI app using uvicorn with 4 workers
|
| 21 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "4"]
|
| 22 |
-
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Install system dependencies (optional, depending on the need for certain Python packages)
|
| 8 |
+
RUN apt-get update && apt-get install -y build-essential git libglib2.0-0 libsm6 libxrender1 libxext6 libjpeg-dev zlib1g-dev && rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Copy all project files into the working directory
|
| 11 |
COPY . .
|
|
|
|
| 14 |
RUN pip install --upgrade pip && \
|
| 15 |
pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# No need to expose ports or manually run uvicorn here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|