mgbam commited on
Commit
2680a3e
·
verified ·
1 Parent(s): efeba2d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,11 +1,11 @@
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/* && \
@@ -14,15 +14,15 @@ RUN apt-get update && \
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"]
 
1
+ # Enable BuildKit when building: DOCKER_BUILDKIT=1
2
  FROM python:3.10-slim
3
 
4
  ENV PYTHONUNBUFFERED=1
5
 
6
  WORKDIR /home/user/app
7
 
8
+ # System deps
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/* && \
 
14
  # Upgrade pip
15
  RUN pip install --no-cache-dir pip setuptools
16
 
17
+ # Copy requirements and install
18
  COPY requirements.txt .
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Copy source
22
  COPY . .
23
 
24
+ # Expose Flask port
25
+ EXPOSE 8080
26
 
27
+ # Run Flask app (no reloader conflict)
28
+ CMD ["python", "app.py"]