datnguyentien204 commited on
Commit
fc849e9
1 Parent(s): ca1e904

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -22
Dockerfile CHANGED
@@ -1,23 +1,31 @@
1
- FROM python:3.10.13-slim
2
- WORKDIR /app
3
-
4
- RUN apt-get update && apt-get install -y \
5
- build-essential \
6
- curl \
7
- software-properties-common \
8
- git \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
12
-
13
- COPY . /app
14
- 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
15
- RUN pip3 install -r requirements.txt
16
- RUN pip install fpdf
17
- RUN pip3 install git+https://github.com/tatsy/torchmcubes.git
18
-
19
- EXPOSE 7860
20
-
21
- HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
22
-
 
 
 
 
 
 
 
 
23
  CMD ["streamlit", "run", "☰_Main.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.10.13-slim
2
+ WORKDIR /app
3
+
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ curl \
7
+ software-properties-common \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ RUN mkdir -p /tmp/matplotlib /tmp/huggingface /tmp/torch /app/tmp /tmp/numba_cache
12
+
13
+ ENV MPLCONFIGDIR=/tmp/matplotlib
14
+ ENV TRANSFORMERS_CACHE=/tmp/huggingface
15
+ ENV TORCH_HOME=/tmp/torch
16
+ ENV NUMBA_CACHE_DIR=/tmp/numba_cache
17
+
18
+
19
+ RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
20
+
21
+ COPY . /app
22
+ 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
23
+ RUN pip3 install -r requirements.txt
24
+ RUN pip install fpdf
25
+ RUN pip3 install git+https://github.com/tatsy/torchmcubes.git
26
+
27
+ EXPOSE 7860
28
+
29
+ HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
30
+
31
  CMD ["streamlit", "run", "☰_Main.py", "--server.port=7860", "--server.address=0.0.0.0"]