Spaces:
Build error
Build error
Update Dockerfile
Browse files- 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 ./
|
| 15 |
-
COPY src/ ./src/
|
|
|
|
| 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
|
| 24 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
ENTRYPOINT ["streamlit", "run", "
|
|
|
|
| 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"]
|