KM_2024_Docker / Dockerfile
datnguyentien204's picture
Update Dockerfile
761abef verified
raw
history blame
939 Bytes
FROM python:3.10.13-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /tmp/matplotlib /tmp/huggingface /tmp/torch /app/tmp /tmp/numba_cache
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV TRANSFORMERS_CACHE=/tmp/huggingface
ENV TORCH_HOME=/tmp/torch
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
COPY . /app
RUN pip3 install torch==1.12.0+cpu torchvision==0.13.0+cpu torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cpu
RUN pip3 install -r requirements.txt
RUN pip install fpdf
RUN pip3 install git+https://github.com/tatsy/torchmcubes.git
EXPOSE 7860
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
RUN chmod -R 777 /app
CMD ["streamlit", "run", "☰_Main.py", "--server.port=7860", "--server.address=0.0.0.0"]