Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +30 -0
Dockerfile
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use Python 3.9 as the base
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Avoid interactive prompts
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Install system dependencies
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
git \
|
10 |
+
ffmpeg \
|
11 |
+
libsm6 \
|
12 |
+
libxext6 \
|
13 |
+
libgl1-mesa-glx \
|
14 |
+
&& rm -rf /var/lib/apt/lists/*
|
15 |
+
|
16 |
+
# Set working directory
|
17 |
+
WORKDIR /app
|
18 |
+
|
19 |
+
# Copy all project files into the container
|
20 |
+
COPY . .
|
21 |
+
|
22 |
+
# Install Python dependencies
|
23 |
+
RUN pip install --no-cache-dir --upgrade pip \
|
24 |
+
&& pip install --no-cache-dir -r requirements.txt
|
25 |
+
|
26 |
+
# Expose the app (usually for Streamlit)
|
27 |
+
EXPOSE 7860
|
28 |
+
|
29 |
+
# Run your Streamlit app
|
30 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]
|