arif670 commited on
Commit
9f82f30
·
verified ·
1 Parent(s): be559b5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -15
Dockerfile CHANGED
@@ -1,32 +1,24 @@
1
  FROM python:3.10-slim
2
 
3
- # System libraries
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
6
  libgl1 \
7
  libglib2.0-0 \
8
  libsm6 \
9
  libxext6 \
10
- fontconfig \
11
- fonts-dejavu \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Environment configuration
15
- ENV MPLCONFIGDIR=/tmp/matplotlib \
16
- FONTCONFIG_PATH=/tmp/fontconfig \
17
- XDG_CACHE_HOME=/tmp \
18
- PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.9 \
19
- TF_CPP_MIN_LOG_LEVEL=3
20
-
21
- # Create writable directories
22
- RUN mkdir -p ${MPLCONFIGDIR} \
23
- && mkdir -p ${FONTCONFIG_PATH} \
24
- && chmod -R 777 /tmp
25
 
26
  WORKDIR /app
27
  COPY . .
28
 
29
- # Install dependencies with optimized build
30
  RUN pip install --no-cache-dir -U pip && \
31
  pip install --no-cache-dir -r requirements.txt
32
 
 
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