asad9641 commited on
Commit
56b6f2b
·
verified ·
1 Parent(s): f1cb9b0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -8
Dockerfile CHANGED
@@ -1,28 +1,33 @@
1
- # Use full Python image to avoid missing build dependencies
2
  FROM python:3.11
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies required for building Python packages
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  libffi-dev \
11
  libssl-dev \
12
  git \
13
  curl \
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Copy project files
 
 
 
17
  COPY requirements.txt .
18
- COPY app.py .
19
 
20
- # Upgrade pip and install Python dependencies
21
- RUN pip install --upgrade pip
22
- RUN pip install -r requirements.txt
 
 
23
 
24
  # Expose Streamlit port
25
  EXPOSE 8501
26
 
27
- # Launch Streamlit
28
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ # Use full Python image
2
  FROM python:3.11
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies needed for Python packages
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  libffi-dev \
11
  libssl-dev \
12
  git \
13
  curl \
14
+ wget \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Upgrade pip
18
+ RUN pip install --upgrade pip
19
+
20
+ # Copy requirements first (better caching)
21
  COPY requirements.txt .
 
22
 
23
+ # Install Python dependencies
24
+ RUN pip install --no-cache-dir -r requirements.txt
25
+
26
+ # Copy app
27
+ COPY app.py .
28
 
29
  # Expose Streamlit port
30
  EXPOSE 8501
31
 
32
+ # Run Streamlit
33
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]