audio-classifier / Dockerfile
ahmedtarekabd's picture
Update Dockerfile.
723e215
FROM python:3.10-slim
WORKDIR /app
# Source: https://stackoverflow.com/questions/55036740/lightgbm-inside-docker-libgomp-so-1-cannot-open-shared-object-file
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
build-essential \
curl \
software-properties-common \
git \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements_docker.txt requirements_docker.txt
RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements_docker.txt
RUN mkdir -p /.streamlit
RUN chmod -R 777 /.streamlit
RUN mkdir -p /.config
RUN chmod -R 777 /.config
RUN mkdir -p /app/mlruns/.trash
RUN chmod -R 777 /app/mlruns/.trash
RUN find /app -type d -exec chmod 777 {} \;
RUN find /app -type f -exec chmod 644 {} \;
COPY . .
VOLUME ["/data", "/results"]
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]