-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
John Dutchover
committed
Dec 11, 2023
1 parent
33baa3d
commit a2e8be4
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
FROM python:3.11.4-slim-bookworm | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.11.6-slim-bookworm | ||
|
||
# Set the working directory in the Docker image | ||
WORKDIR /client | ||
ENV PYTHONPATH /client | ||
|
||
# Copy the requirements.txt first to leverage Docker cache | ||
COPY frontend/requirements_frontend.txt /client/requirements_frontend.txt | ||
COPY frontend/start_streamlit.sh /client/start_streamlit.sh | ||
|
||
RUN chmod +x /client/start_streamlit.sh | ||
RUN pip install --no-cache-dir -r requirements_frontend.txt | ||
|
||
# Copy the app directory contents into the container at /client/frontend | ||
COPY frontend/ . | ||
|
||
# Make port 8501 available to the world outside this container | ||
EXPOSE 8501 | ||
|
||
HEALTHCHECK --interval=5m --timeout=3s \ | ||
--start-period=1m \ | ||
CMD curl --fail http://localhost:8501 || exit 1 | ||
|
||
|
||
# Run startup script | ||
ENTRYPOINT ["bash", "start_streamlit.sh"] |