Spaces:
Sleeping
Sleeping
| 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}" | |