Enoch1359 commited on
Commit
1c85503
·
verified ·
1 Parent(s): 0395bcc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -1,24 +1,21 @@
1
- # Use a minimal base image with Python 3.9 installed
2
  FROM python:3.9-slim
3
 
4
- # Set environment variables to prevent interactive prompts
5
  ENV PYTHONDONTWRITEBYTECODE 1
6
  ENV PYTHONUNBUFFERED 1
7
 
8
- # Set the working directory inside the container to /app
9
  WORKDIR /app
10
 
11
- # Copy all files (including ping.env) into the container
12
- COPY . .
 
 
 
 
13
 
14
- # Install Python dependencies
15
- RUN pip3 install --no-cache-dir -r requirements.txt
16
 
17
- # Install dotenv to read .env files inside app.py
18
- RUN pip3 install python-dotenv
19
 
20
- # Expose the port Streamlit uses
21
  EXPOSE 8501
22
 
23
- # Define the command to run the Streamlit app
24
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
 
 
1
  FROM python:3.9-slim
2
 
 
3
  ENV PYTHONDONTWRITEBYTECODE 1
4
  ENV PYTHONUNBUFFERED 1
5
 
 
6
  WORKDIR /app
7
 
8
+ # Install system packages
9
+ RUN apt-get update && apt-get install -y \
10
+ libmagic1 \
11
+ build-essential \
12
+ curl \
13
+ && rm -rf /var/lib/apt/lists/*
14
 
15
+ COPY . .
 
16
 
17
+ RUN pip install --no-cache-dir -r requirements.txt
 
18
 
 
19
  EXPOSE 8501
20
 
 
21
  CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]