GSLC-MLOps / Dockerfile
github-actions
Deploy from GitHub Actions: 4025db1ea73f71f9c2a3953aa74dd93cdedb2084
d7f4720
Raw
History Blame Contribute Delete
519 Bytes
FROM python:3.11-slim
ARG APP_USER=app
RUN useradd -m ${APP_USER}
ENV HOME=/home/${APP_USER}
WORKDIR ${HOME}/app
# deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# app files
COPY . .
RUN mkdir -p ${HOME}/.streamlit && \
printf "[browser]\ngatherUsageStats = false\n" > ${HOME}/.streamlit/config.toml && \
chown -R ${APP_USER}:${APP_USER} ${HOME}
USER ${APP_USER}
ENV PORT=7860
EXPOSE 7860
CMD bash -lc "streamlit run app.py --server.address=0.0.0.0 --server.port=${PORT}"