Moderation-playground / Dockerfile
Kiran5's picture
Update Dockerfile
692f700 verified
raw
history blame contribute delete
862 Bytes
FROM python:3.9-slim
# Install Debian equivalents of Ubuntu packages
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
fonts-liberation \
libgl1 \
libglx-mesa0 \
mesa-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Create user
RUN adduser --disabled-password --gecos '' streamlit-user
RUN chown -R streamlit-user:streamlit-user /app
USER streamlit-user
ENV HOME=/app
ENV PATH="/app/.local/bin:${PATH}"
COPY requirements.txt ./
RUN pip3 install --user -r requirements.txt
RUN mkdir -p .streamlit
COPY .streamlit/ ./.streamlit/
COPY src/ ./src/
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_ENABLECORS=false
ENV STREAMLIT_SERVER_PORT=7860
EXPOSE 7860
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py"]