anfastech commited on
Commit
029cecd
·
1 Parent(s): d0f44d0

Adding Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -0
Dockerfile CHANGED
@@ -8,6 +8,14 @@ RUN apt-get update && apt-get install -y \
8
  libsndfile1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
 
 
 
 
 
11
  # Copy requirements
12
  COPY requirements.txt .
13
 
@@ -15,6 +23,8 @@ COPY requirements.txt .
15
  # numpy MUST be first, before torch/torchaudio
16
  RUN pip install --no-cache-dir "numpy>=1.24.0,<2.0.0"
17
 
 
 
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  # Copy application code
 
8
  libsndfile1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Upgrade pip first
12
+ RUN pip install --upgrade pip wheel
13
+
14
+ # Pin setuptools to version 64.x (last version with use_2to3 support)
15
+ # This prevents errors if old packages like googleads are pulled as dependencies
16
+ # Version 64.0.0 is the last that supports use_2to3, preventing googleads installation errors
17
+ RUN pip install --no-cache-dir "setuptools==64.0.0"
18
+
19
  # Copy requirements
20
  COPY requirements.txt .
21
 
 
23
  # numpy MUST be first, before torch/torchaudio
24
  RUN pip install --no-cache-dir "numpy>=1.24.0,<2.0.0"
25
 
26
+ # Install requirements
27
+ # setuptools 64.0.0 (pinned above) supports use_2to3, so if googleads is pulled as a dependency, it won't fail
28
  RUN pip install --no-cache-dir -r requirements.txt
29
 
30
  # Copy application code