File size: 916 Bytes
fc849e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ca1e904
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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

CMD ["streamlit", "run", "☰_Main.py", "--server.port=7860", "--server.address=0.0.0.0"]