HMZaheer commited on
Commit
7da8127
·
verified ·
1 Parent(s): 6efd373

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -8
Dockerfile CHANGED
@@ -1,30 +1,22 @@
1
- # Use official lightweight Python image
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies (for scientific libs + image processing)
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  libgl1 \
11
  libglib2.0-0 \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Copy requirements and install
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Copy app code
19
  COPY . .
20
 
21
- # Streamlit runs on port 7860 inside Hugging Face
22
  EXPOSE 7860
23
 
24
- # Set environment variables for Streamlit
25
  ENV STREAMLIT_SERVER_HEADLESS=true \
26
  STREAMLIT_SERVER_PORT=7860 \
27
  STREAMLIT_SERVER_ENABLECORS=false
28
 
29
- # Run the Streamlit app
30
  CMD ["streamlit", "run", "app.py"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  libgl1 \
8
  libglib2.0-0 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
 
14
  COPY . .
15
 
 
16
  EXPOSE 7860
17
 
 
18
  ENV STREAMLIT_SERVER_HEADLESS=true \
19
  STREAMLIT_SERVER_PORT=7860 \
20
  STREAMLIT_SERVER_ENABLECORS=false
21
 
 
22
  CMD ["streamlit", "run", "app.py"]