KZTech commited on
Commit
66783c6
·
verified ·
1 Parent(s): ec214a3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -12
Dockerfile CHANGED
@@ -1,9 +1,5 @@
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
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
@@ -12,24 +8,24 @@ RUN apt-get update && apt-get install -y \
12
  libpq-dev \
13
  libssl-dev \
14
  curl \
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
 
 
 
1
  FROM python:3.10-slim
2
 
 
 
 
3
  # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  build-essential \
 
8
  libpq-dev \
9
  libssl-dev \
10
  curl \
11
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
 
12
 
13
  # Set working directory
14
  WORKDIR /app
15
 
16
+ # Copy dependency list
17
  COPY requirements.txt .
18
 
19
  # Install Python packages
20
  RUN pip install --upgrade pip && pip install -r requirements.txt
21
 
22
+ # Copy app code
23
  COPY . .
24
 
25
+ # Expose the correct port
26
+ EXPOSE 7860
27
+
28
+ # Run Streamlit on Hugging Face's required port
29
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
30
 
 
 
31