-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (27 loc) · 938 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Use the official Python image from the Docker Hub
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# Update PIP
RUN pip install --upgrade pip
# Create a directory for the app
RUN mkdir -p /app/
# Copy the current directory contents into the container
COPY ./.streamlit/ /app/.streamlit/
COPY ./gsopt/ /app/gsopt/
COPY ./data/ /app/data/
COPY pyproject.toml /app/
# Set the working directory in the container
WORKDIR /app
# Install any dependencies
RUN pip install --no-cache-dir .
# Make port 8080 available to the world outside this container
EXPOSE 8080
# Enture the Streamlit app is healthy
HEALTHCHECK CMD curl --fail http://localhost:8080/_stcore/health
# Run Streamlit when the container launches
ENTRYPOINT ["streamlit", "run", "gsopt/app.py", "--server.port=8080", "--server.address=0.0.0.0"]