Update Dockerfile
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -1,26 +1,22 @@
|
|
| 1 |
-
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies
|
|
|
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
ffmpeg \
|
| 10 |
-
libgl1
|
| 11 |
libglib2.0-0 \
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
# Copy requirements and install
|
| 15 |
COPY requirements.txt .
|
| 16 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 17 |
|
| 18 |
-
# Copy the entire project
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
-
# Hugging Face Spaces
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
-
# Run the FastAPI app using uvicorn
|
| 25 |
-
# We map the internal port to 7860 to match HF requirements
|
| 26 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
+
# Switched libgl1-mesa-glx -> libgl1
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
ffmpeg \
|
| 9 |
+
libgl1 \
|
| 10 |
libglib2.0-0 \
|
| 11 |
+
build-essential \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
|
|
|
| 14 |
COPY requirements.txt .
|
| 15 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 16 |
|
|
|
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
+
# Hugging Face Spaces port
|
| 20 |
EXPOSE 7860
|
| 21 |
|
|
|
|
|
|
|
| 22 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|