E5K7 commited on
Commit
c20c0b4
·
1 Parent(s): 1f74de6

fix: Add build-dependencies for PyTorch, Librosa, and bcrypt, and compel CPU-only PyTorch download to prevent Hugging Face Docker Container Out-Of-Memory crashes

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -8,6 +8,8 @@ RUN apt-get update && apt-get install -y \
8
  git \
9
  nodejs \
10
  npm \
 
 
11
  && apt-get clean \
12
  && rm -rf /var/lib/apt/lists/*
13
 
@@ -22,9 +24,10 @@ RUN chown -R user:user $HOME
22
  USER user
23
 
24
  # Copy requirements and install Python dependencies
 
25
  COPY --chown=user:user backend/requirements.txt ./backend/
26
  RUN pip install --no-cache-dir --upgrade pip && \
27
- pip install --no-cache-dir -r backend/requirements.txt
28
 
29
  # Copy frontend package.json to install node modules
30
  COPY --chown=user:user frontend/package*.json ./frontend/
 
8
  git \
9
  nodejs \
10
  npm \
11
+ build-essential \
12
+ libsndfile1 \
13
  && apt-get clean \
14
  && rm -rf /var/lib/apt/lists/*
15
 
 
24
  USER user
25
 
26
  # Copy requirements and install Python dependencies
27
+ # Added extra-index-url for CPU-only PyTorch to prevent 3GB+ CUDA timeout/OOM crashes!
28
  COPY --chown=user:user backend/requirements.txt ./backend/
29
  RUN pip install --no-cache-dir --upgrade pip && \
30
+ pip install --no-cache-dir -r backend/requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
31
 
32
  # Copy frontend package.json to install node modules
33
  COPY --chown=user:user frontend/package*.json ./frontend/