randomf_predict / Dockerfile
leonsimon23's picture
Create Dockerfile
ecedd47 verified
raw
history blame
897 Bytes
# syntax=docker/dockerfile:1.4
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install necessary dependencies
RUN apt-get update && apt-get install -y git
# Set Matplotlib configuration directory
ENV MPLCONFIGDIR=/tmp/.matplotlib
RUN mkdir -p /app && chmod -R 777 /app
# Create Matplotlib configuration directory
RUN mkdir -p /tmp/.matplotlib && chmod -R 777 /tmp/.matplotlib
# Clone private repository using mounted secret
RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \
git clone https://x-access-token:$(cat /run/secrets/GITHUB_TOKEN)@github.com/leoncool23/sci_random_forest_classify.git .
# Install Python dependencies
RUN pip install -r requirements.txt
EXPOSE 7860
#CMD ["streamlit", "run", "app.py", "--server.port=7860"]
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]