mgbam commited on
Commit
3d41682
·
verified ·
1 Parent(s): a08e329

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use BuildKit for better caching: DOCKER_BUILDKIT=1
2
+ FROM python:3.10-slim
3
+
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ WORKDIR /home/user/app
7
+
8
+ # System dependencies
9
+ RUN apt-get update && \
10
+ apt-get install -y --no-install-recommends git git-lfs ffmpeg libsm6 libxext6 libgl1-mesa-glx && \
11
+ rm -rf /var/lib/apt/lists/* && \
12
+ git lfs install
13
+
14
+ # Upgrade pip
15
+ RUN pip install --no-cache-dir pip setuptools
16
+
17
+ # Copy requirements and install (cached unless requirements.txt changes)
18
+ COPY requirements.txt .
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy rest of source
22
+ COPY . .
23
+
24
+ # Expose default Streamlit port (change if using Flask)
25
+ EXPOSE 8501
26
+
27
+ # Default command: run Streamlit. If using Flask instead, adjust to ["python", "app.py"]
28
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.enableCORS=false"]