Singhp08 commited on
Commit
54c7c2a
·
verified ·
1 Parent(s): 5643323

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -26
Dockerfile CHANGED
@@ -1,36 +1,11 @@
1
- # 1. Lightweight base image
2
  FROM python:3.10-slim
3
 
4
- # 2. System dependencies (merge in single RUN to reduce layers)
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
- tesseract-ocr \
7
  ffmpeg \
8
- libgl1 \
9
- libglib2.0-0 \
10
- build-essential \
11
- && apt-get clean \
12
- && rm -rf /var/lib/apt/lists/*
13
 
14
  WORKDIR /app
15
 
16
- # 3. Upgrade pip & friends
17
- RUN pip install --no-cache-dir --upgrade pip setuptools wheel
18
-
19
- # 4. Install PyTorch CPU-only (pre-built wheels, low memory)
20
- RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
21
-
22
- # 5. Install other heavy packages one by one to avoid peak memory
23
- # (Adjust list based on your updated requirements.txt)
24
- # If you removed basicsr/gfpgan/realesrgan, comment/remove these lines.
25
-
26
- # Comment out if not needed:
27
- # RUN pip install --no-cache-dir basicsr
28
- # RUN sed -i "s/from torchvision.transforms.functional_tensor import rgb_to_grayscale/from torchvision.transforms.functional import rgb_to_grayscale/g" /usr/local/lib/python3.10/site-packages/basicsr/data/degradations.py || true
29
-
30
- # RUN pip install --no-cache-dir gfpgan
31
- # RUN pip install --no-cache-dir realesrgan
32
-
33
- # 6. Install remaining requirements
34
  COPY requirements.txt .
35
  RUN pip install --no-cache-dir -r requirements.txt
36
 
 
 
1
  FROM python:3.10-slim
2
 
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
4
  ffmpeg \
5
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
 
 
 
 
6
 
7
  WORKDIR /app
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11