Devashishraghav commited on
Commit
74c4382
·
verified ·
1 Parent(s): 1d828f9

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.12-slim
2
 
3
  # System dependencies for OpenCV
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -13,9 +13,12 @@ ENV PATH="/home/user/.local/bin:$PATH"
13
 
14
  WORKDIR /app
15
 
16
- # Install Python dependencies
17
  COPY --chown=user requirements.txt .
18
- RUN pip install --no-cache-dir --user -r requirements.txt
 
 
 
19
 
20
  # Copy application code
21
  COPY --chown=user . .
 
1
+ FROM python:3.11-slim
2
 
3
  # System dependencies for OpenCV
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
13
 
14
  WORKDIR /app
15
 
16
+ # Install Python dependencies in stages to avoid OOM
17
  COPY --chown=user requirements.txt .
18
+ RUN pip install --no-cache-dir --user fastapi uvicorn python-multipart python-dotenv Pillow numpy
19
+ RUN pip install --no-cache-dir --user opencv-contrib-python-headless
20
+ RUN pip install --no-cache-dir --user rembg[cpu]
21
+ RUN pip install --no-cache-dir --user google-genai
22
 
23
  # Copy application code
24
  COPY --chown=user . .