IJ-Reynolds HF Staff commited on
Commit
02895e8
·
verified ·
1 Parent(s): 4665e69

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,27 +1,25 @@
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
- # 1. Install system tools
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
- software-properties-common \
10
  git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # 2. Copy the requirements file FIRST
14
  COPY requirements.txt .
15
-
16
- # 3. Install the libraries
17
  RUN pip3 install --no-cache-dir -r requirements.txt
18
 
19
- # 4. Copy the rest of the code AFTER libraries are installed
20
  COPY . .
21
 
22
- # 5. Set environment variables for Streamlit
23
  ENV STREAMLIT_SERVER_PORT=7860
24
  ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
25
 
26
- # 6. Run it
27
  CMD ["streamlit", "run", "streamlit_app.py"]
 
1
  FROM python:3.9-slim
2
 
3
+ # Set the working directory
4
  WORKDIR /app
5
 
6
+ # 1. Install ONLY the absolute necessities
7
  RUN apt-get update && apt-get install -y \
8
  build-essential \
9
  curl \
 
10
  git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # 2. Copy and install requirements
14
  COPY requirements.txt .
 
 
15
  RUN pip3 install --no-cache-dir -r requirements.txt
16
 
17
+ # 3. Copy the rest of the code
18
  COPY . .
19
 
20
+ # 4. Streamlit environment variables
21
  ENV STREAMLIT_SERVER_PORT=7860
22
  ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
23
 
24
+ # 5. Launch
25
  CMD ["streamlit", "run", "streamlit_app.py"]