stroke-classification / Dockerfile
bakhili's picture
Update Dockerfile
78305b7 verified
raw
history blame contribute delete
814 Bytes
FROM python:3.9-slim
WORKDIR /app
# Set environment variables for Streamlit
ENV HOME=/tmp
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_ENABLE_CORS=false
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_GLOBAL_DEVELOPMENT_MODE=false
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
COPY src/ ./src/
RUN pip3 install -r requirements.txt
# Create streamlit config directory in the temporary home
RUN mkdir -p /tmp/.streamlit
EXPOSE 7860
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0"]