Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +1 -19
Dockerfile
CHANGED
|
@@ -9,12 +9,11 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
build-essential \
|
| 10 |
curl \
|
| 11 |
software-properties-common \
|
|
|
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# Copy the requirements file into the container
|
| 15 |
COPY requirements.txt .
|
| 16 |
-
|
| 17 |
-
# Install any needed packages specified in requirements.txt
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
# Create necessary directories
|
|
@@ -32,24 +31,7 @@ RUN touch app/__init__.py app/pages/__init__.py
|
|
| 32 |
|
| 33 |
# Copy the application code and other files into the container
|
| 34 |
COPY app/ ./app/
|
| 35 |
-
COPY config/ ./config/
|
| 36 |
COPY data/ ./data/
|
| 37 |
COPY grafana/ ./grafana/
|
| 38 |
-
COPY .env ./
|
| 39 |
-
COPY .streamlit/config.toml /root/.streamlit/config.toml
|
| 40 |
-
|
| 41 |
-
# Make port 8501 available to the world outside this container
|
| 42 |
-
EXPOSE 8501
|
| 43 |
-
|
| 44 |
-
# Create a healthcheck script
|
| 45 |
-
RUN echo '#!/bin/bash\ncurl -f http://localhost:8501/_stcore/health' > /healthcheck.sh && \
|
| 46 |
-
chmod +x /healthcheck.sh
|
| 47 |
-
|
| 48 |
-
# Add healthcheck
|
| 49 |
-
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
| 50 |
-
CMD ["/healthcheck.sh"]
|
| 51 |
|
| 52 |
-
# Run Streamlit
|
| 53 |
-
ENV STREAMLIT_SERVER_PORT=7860
|
| 54 |
-
EXPOSE 7860
|
| 55 |
CMD ["streamlit", "run", "app/home.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 9 |
build-essential \
|
| 10 |
curl \
|
| 11 |
software-properties-common \
|
| 12 |
+
python3-dev \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
# Copy the requirements file into the container
|
| 16 |
COPY requirements.txt .
|
|
|
|
|
|
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
# Create necessary directories
|
|
|
|
| 31 |
|
| 32 |
# Copy the application code and other files into the container
|
| 33 |
COPY app/ ./app/
|
|
|
|
| 34 |
COPY data/ ./data/
|
| 35 |
COPY grafana/ ./grafana/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
|
|
|
|
|
|
|
|
|
| 37 |
CMD ["streamlit", "run", "app/home.py", "--server.port=7860", "--server.address=0.0.0.0"]
|