arif670 commited on
Commit
0acc2d2
·
verified ·
1 Parent(s): 3fa9f41

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -1,26 +1,29 @@
1
  FROM python:3.10-slim
2
 
3
- # System dependencies
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  libgl1 \
7
  libglib2.0-0 \
8
  libsm6 \
9
  libxext6 \
10
- g++ \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Configure environment
14
- ENV XDG_CACHE_HOME=/tmp \
15
- TORCH_USE_CUDA_DSA=1 \
16
- PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9
 
 
 
 
17
 
18
  WORKDIR /app
19
  COPY . .
20
 
21
- # Install with optimized dependencies
22
- RUN pip install --no-cache-dir -U pip && \
23
- pip install --no-cache-dir -r requirements.txt
24
 
25
  EXPOSE 7860
26
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  ffmpeg \
5
  libgl1 \
6
  libglib2.0-0 \
7
  libsm6 \
8
  libxext6 \
9
+ fontconfig \
10
+ fonts-dejavu \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ ENV MPLCONFIGDIR=/tmp/matplotlib \
14
+ FONTCONFIG_PATH=/tmp/fontconfig \
15
+ XDG_CACHE_HOME=/tmp \
16
+ PYTHONUNBUFFERED=1
17
+
18
+ RUN mkdir -p ${MPLCONFIGDIR} \
19
+ && mkdir -p ${FONTCONFIG_PATH} \
20
+ && chmod -R 777 /tmp
21
 
22
  WORKDIR /app
23
  COPY . .
24
 
25
+ RUN pip install --no-cache-dir -U pip \
26
+ && pip install --no-cache-dir -r requirements.txt
 
27
 
28
  EXPOSE 7860
29
  CMD ["python", "app.py"]