entropy25 commited on
Commit
4cc249d
·
verified ·
1 Parent(s): 8cc1c27

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -11,8 +11,9 @@ RUN apt-get update && apt-get install -y \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Copy requirements and application files
14
- COPY requirements.txt ./ # Copy the requirements.txt to the container
15
- COPY src/ ./src/ # Copy the src directory to the container
 
16
 
17
  # Install Python dependencies
18
  RUN pip3 install -r requirements.txt
@@ -20,8 +21,8 @@ RUN pip3 install -r requirements.txt
20
  # Expose Streamlit's default port
21
  EXPOSE 8501
22
 
23
- # Health check to ensure the application is running properly
24
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
25
 
26
- # Set the Streamlit startup command
27
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Copy requirements and application files
14
+ COPY requirements.txt ./
15
+ COPY src/ ./src/
16
+ COPY *.py ./ # 添加这一行来复制根目录的Python文件
17
 
18
  # Install Python dependencies
19
  RUN pip3 install -r requirements.txt
 
21
  # Expose Streamlit's default port
22
  EXPOSE 8501
23
 
24
+ # Health check
25
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
26
 
27
+ # 修改这一行指向正确的文件
28
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]