larrysim commited on
Commit
aa160cc
·
verified ·
1 Parent(s): 41fdbf7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -21
Dockerfile CHANGED
@@ -1,30 +1,17 @@
1
- # Use an official Python runtime as a base image
2
- FROM python:3.9-slim
3
 
4
- # Set working directory in the container
5
  WORKDIR /app
6
 
7
- # Install system dependencies required for TensorFlow and other packages
8
- RUN apt-get update && apt-get install -y \
9
- gcc \
10
- g++ \
11
- make \
12
- && rm -rf /var/lib/apt/lists/*
13
-
14
- # Copy requirements file first to leverage Docker cache
15
  COPY requirements.txt .
16
-
17
- # Install Python dependencies
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy the rest of the application files
21
  COPY . .
22
 
23
- # Expose the port Streamlit will run on
24
- EXPOSE 8501
25
-
26
- # Health check to ensure the application is running
27
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
28
 
29
- # Command to run the application
30
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.10-slim
 
2
 
3
+ # Set working directory
4
  WORKDIR /app
5
 
6
+ # Install dependencies
 
 
 
 
 
 
 
7
  COPY requirements.txt .
 
 
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
+ # Copy app files
11
  COPY . .
12
 
13
+ # Streamlit-specific settings
14
+ EXPOSE 7860
 
 
 
15
 
16
+ # Run Streamlit app
17
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]