Refactor Dockerfile to remove unnecessary packages and streamline installation process

This commit is contained in:
2024-05-28 14:53:32 +08:00
parent daa40c6aa4
commit ce1cfbf4c7
4 changed files with 142 additions and 29 deletions
-29
View File
@@ -1,29 +0,0 @@
# base image
FROM python:3.12-slim
#basic build prep
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# copy over and install packages
COPY ./src/requirements.txt ./requirements.txt
RUN pip3 install cython
RUN pip3 install -r requirements.txt
# streamlit-specific commands
RUN mkdir -p /root/.streamlit
RUN bash -c 'echo -e "\
[general]\n\
email = \"\"\n\
" > /root/.streamlit/credentials.toml'
# RUN bash -c 'echo -e "\
# [server]\n\
# baseUrlPath = \"/fin\"\n\
# " > /root/.streamlit/config.toml'
# copying everything over
COPY . .