Spaces:
Sleeping
Sleeping
Upload Dockerfile
Browse files- Dockerfile +28 -0
Dockerfile
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
# Set working directory
|
4 |
+
WORKDIR /app
|
5 |
+
|
6 |
+
# Install system dependencies
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
git \
|
9 |
+
build-essential \
|
10 |
+
ffmpeg \
|
11 |
+
&& rm -rf /var/lib/apt/lists/*
|
12 |
+
|
13 |
+
# Copy requirements and install Python dependencies
|
14 |
+
COPY requirements.txt .
|
15 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
+
|
17 |
+
# Copy application files
|
18 |
+
COPY . .
|
19 |
+
|
20 |
+
# Expose port 7860 (HF Spaces standard)
|
21 |
+
EXPOSE 7860
|
22 |
+
|
23 |
+
# Set environment variables
|
24 |
+
ENV PYTHONUNBUFFERED=1
|
25 |
+
ENV PORT=7860
|
26 |
+
|
27 |
+
# Run the FastAPI application
|
28 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|