Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -17
Dockerfile
CHANGED
|
@@ -1,24 +1,17 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
ffmpeg \
|
| 8 |
-
libsndfile1 \
|
| 9 |
-
fonts-dejavu \
|
| 10 |
-
build-essential \
|
| 11 |
-
g++ \
|
| 12 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
COPY video /app/video
|
| 20 |
-
COPY server.py /app/server.py
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
CMD ["fastapi", "run", "server.py", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
| 1 |
+
# Use Python base image
|
| 2 |
+
FROM python:3.10
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy files
|
| 8 |
+
COPY . /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# Install requirements
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Expose port (Hugging Face Spaces uses 7860 by default, but FastAPI can run on 8000)
|
| 14 |
+
EXPOSE 8000
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
# Run FastAPI with uvicorn
|
| 17 |
+
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|