Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -10
Dockerfile
CHANGED
@@ -1,20 +1,23 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
|
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
-
|
7 |
-
|
8 |
-
ffmpeg \
|
9 |
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
|
|
11 |
WORKDIR /app
|
12 |
|
13 |
-
|
|
|
14 |
|
15 |
-
|
16 |
-
RUN pip install -r requirements.txt
|
17 |
|
|
|
18 |
EXPOSE 7860
|
19 |
|
20 |
-
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM python:3.10-slim
|
|
|
3 |
|
4 |
+
# System dependencies
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
+
git \
|
7 |
+
libgl1-mesa-glx \
|
|
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
10 |
+
# Set working directory
|
11 |
WORKDIR /app
|
12 |
|
13 |
+
# Copy project files
|
14 |
+
COPY . .
|
15 |
|
16 |
+
# Install Python dependencies
|
17 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
18 |
|
19 |
+
# Expose the FastAPI port
|
20 |
EXPOSE 7860
|
21 |
|
22 |
+
# Run the FastAPI app
|
23 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|