Update Dockerfile
Browse files- Dockerfile +11 -9
Dockerfile
CHANGED
|
@@ -3,35 +3,37 @@ FROM python:3.10
|
|
| 3 |
ENV PYTHONUNBUFFERED=1
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
# ----------------------------
|
| 7 |
# SYSTEM DEPENDENCIES
|
| 8 |
-
# ----------------------------
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
ffmpeg \
|
| 11 |
git \
|
| 12 |
curl \
|
| 13 |
libsndfile1 \
|
|
|
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
# ----------------------------
|
| 17 |
# PYTHON SETUP
|
| 18 |
-
# ----------------------------
|
| 19 |
COPY requirements.txt .
|
| 20 |
|
| 21 |
RUN pip install --upgrade pip setuptools wheel
|
| 22 |
|
| 23 |
-
#
|
| 24 |
RUN pip install torch torchaudio \
|
| 25 |
--index-url https://download.pytorch.org/whl/cpu
|
| 26 |
|
| 27 |
-
# ⭐
|
| 28 |
-
RUN pip install av
|
| 29 |
|
| 30 |
-
#
|
| 31 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 32 |
|
| 33 |
# Install audiocraft LAST
|
| 34 |
-
RUN pip install --no-cache-dir
|
|
|
|
| 35 |
|
| 36 |
COPY . .
|
| 37 |
|
|
|
|
| 3 |
ENV PYTHONUNBUFFERED=1
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# ------------------------------------------------
|
| 7 |
# SYSTEM DEPENDENCIES
|
| 8 |
+
# ------------------------------------------------
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
ffmpeg \
|
| 11 |
git \
|
| 12 |
curl \
|
| 13 |
libsndfile1 \
|
| 14 |
+
pkg-config \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
+
# ------------------------------------------------
|
| 18 |
# PYTHON SETUP
|
| 19 |
+
# ------------------------------------------------
|
| 20 |
COPY requirements.txt .
|
| 21 |
|
| 22 |
RUN pip install --upgrade pip setuptools wheel
|
| 23 |
|
| 24 |
+
# Install CPU torch first
|
| 25 |
RUN pip install torch torchaudio \
|
| 26 |
--index-url https://download.pytorch.org/whl/cpu
|
| 27 |
|
| 28 |
+
# ⭐ Install PyAV binary wheel ONLY
|
| 29 |
+
RUN pip install av --prefer-binary
|
| 30 |
|
| 31 |
+
# App dependencies
|
| 32 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 33 |
|
| 34 |
# Install audiocraft LAST
|
| 35 |
+
RUN pip install --no-cache-dir \
|
| 36 |
+
git+https://github.com/facebookresearch/audiocraft.git
|
| 37 |
|
| 38 |
COPY . .
|
| 39 |
|