Upload Dockerfile
Browse files- Dockerfile +6 -1
Dockerfile
CHANGED
|
@@ -7,13 +7,15 @@ WORKDIR /app
|
|
| 7 |
# Install system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
|
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Copy requirements file
|
| 13 |
COPY requirements.txt .
|
| 14 |
|
| 15 |
# Install Python dependencies
|
| 16 |
-
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
| 17 |
|
| 18 |
# Copy application code
|
| 19 |
COPY . .
|
|
@@ -24,5 +26,8 @@ RUN mkdir -p model
|
|
| 24 |
# Expose port 8501 for Streamlit
|
| 25 |
EXPOSE 8501
|
| 26 |
|
|
|
|
|
|
|
|
|
|
| 27 |
# Run Streamlit app
|
| 28 |
CMD ["python", "-m", "streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 7 |
# Install system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
| 10 |
+
curl \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
# Copy requirements file
|
| 14 |
COPY requirements.txt .
|
| 15 |
|
| 16 |
# Install Python dependencies
|
| 17 |
+
RUN pip3 install --no-cache-dir -r requirements.txt && \
|
| 18 |
+
pip3 install --no-cache-dir streamlit
|
| 19 |
|
| 20 |
# Copy application code
|
| 21 |
COPY . .
|
|
|
|
| 26 |
# Expose port 8501 for Streamlit
|
| 27 |
EXPOSE 8501
|
| 28 |
|
| 29 |
+
# Health check
|
| 30 |
+
HEALTHCHECK CMD curl -f http://localhost:8501/_stcore/health || exit 1
|
| 31 |
+
|
| 32 |
# Run Streamlit app
|
| 33 |
CMD ["python", "-m", "streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|