KZTech commited on
Commit
8b1b279
·
verified ·
1 Parent(s): 67817c7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
- # Use the official slim Python base image
2
  FROM python:3.10-slim
3
 
4
- # Set environment variables to avoid prompts during install
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
  # Install system dependencies
@@ -15,18 +15,21 @@ RUN apt-get update && apt-get install -y \
15
  && apt-get clean \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Set the working directory
19
  WORKDIR /app
20
 
21
- # Copy requirements file if you have one
22
  COPY requirements.txt .
23
 
24
- # Install Python dependencies
25
  RUN pip install --upgrade pip && pip install -r requirements.txt
26
 
27
- # Copy the rest of your application
28
  COPY . .
29
 
30
- # Set the default command to run your app (adjust if needed)
31
- CMD ["python", "app.py"]
 
 
 
32
 
 
1
+ # Use an official Python base image
2
  FROM python:3.10-slim
3
 
4
+ # Set environment variables
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
  # Install system dependencies
 
15
  && apt-get clean \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Set working directory
19
  WORKDIR /app
20
 
21
+ # Copy dependencies
22
  COPY requirements.txt .
23
 
24
+ # Install Python packages
25
  RUN pip install --upgrade pip && pip install -r requirements.txt
26
 
27
+ # Copy the app code
28
  COPY . .
29
 
30
+ # Expose Streamlit default port
31
+ EXPOSE 8501
32
+
33
+ # Run Streamlit properly
34
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
35