Update Dockerfile
Browse files- Dockerfile +2 -14
Dockerfile
CHANGED
|
@@ -1,10 +1,7 @@
|
|
| 1 |
-
# Use slim Python 3.10 base image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install ffmpeg and required system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
ffmpeg \
|
| 10 |
libsm6 \
|
|
@@ -12,18 +9,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
fonts-dejavu-core \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# Copy requirements.txt first to leverage Docker cache
|
| 16 |
COPY requirements.txt .
|
|
|
|
| 17 |
|
| 18 |
-
# Install Python dependencies
|
| 19 |
-
RUN pip install --no-cache-dir --upgrade pip \
|
| 20 |
-
&& pip install --no-cache-dir -r requirements.txt
|
| 21 |
-
|
| 22 |
-
# Copy your full app into the container
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
-
|
| 26 |
-
EXPOSE 7860
|
| 27 |
-
|
| 28 |
-
# Start the FastAPI app with Uvicorn
|
| 29 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
ffmpeg \
|
| 7 |
libsm6 \
|
|
|
|
| 9 |
fonts-dejavu-core \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
|
|
| 12 |
COPY requirements.txt .
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|