Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
841316f
1
Parent(s):
4ec0a5d
added Dockerfile
Browse files
Dokerfile
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python 3.11
|
| 2 |
+
FROM python:3.11
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Install system dependencies
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
git \
|
| 10 |
+
libsndfile1 \
|
| 11 |
+
fluid-soundfont-gm \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
+
|
| 14 |
+
# Upgrade pip before installing dependencies
|
| 15 |
+
RUN pip install --upgrade pip
|
| 16 |
+
|
| 17 |
+
# Copy and install Python dependencies first (before cloning anticipation)
|
| 18 |
+
COPY requirements.txt .
|
| 19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
+
|
| 21 |
+
# Clone and install Anticipation Music Transformer (AMT)
|
| 22 |
+
RUN git clone https://github.com/jthickstun/anticipation.git
|
| 23 |
+
|
| 24 |
+
# Install AMT dependencies separately to avoid conflicts
|
| 25 |
+
RUN pip install -r anticipation/requirements.txt && \
|
| 26 |
+
pip install ./anticipation
|
| 27 |
+
|
| 28 |
+
# Debugging: Check installed packages
|
| 29 |
+
RUN pip list
|
| 30 |
+
|
| 31 |
+
# Copy the application files into the container
|
| 32 |
+
COPY . .
|
| 33 |
+
|
| 34 |
+
# Run the Gradio app
|
| 35 |
+
CMD ["python", "app.py"]
|