Spaces:
Runtime error
Runtime error
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +42 -0
Dockerfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
|
| 2 |
+
|
| 3 |
+
# Install Python 3.11 and system deps
|
| 4 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
python3.11 python3.11-venv python3.11-dev python3-pip \
|
| 6 |
+
git wget curl libsndfile1 ffmpeg \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
+
|
| 9 |
+
# Set Python 3.11 as default
|
| 10 |
+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 \
|
| 11 |
+
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
|
| 12 |
+
|
| 13 |
+
# Install uv
|
| 14 |
+
RUN pip install uv
|
| 15 |
+
|
| 16 |
+
# Create non-root user for HF Spaces
|
| 17 |
+
RUN useradd -m -u 1000 user
|
| 18 |
+
USER user
|
| 19 |
+
ENV HOME=/home/user PATH="/home/user/.local/bin:$PATH"
|
| 20 |
+
|
| 21 |
+
WORKDIR /home/user/app
|
| 22 |
+
|
| 23 |
+
# Clone ACE-Step 1.5
|
| 24 |
+
RUN git clone https://github.com/ACE-Step/ACE-Step-1.5.git /home/user/app/acestep
|
| 25 |
+
|
| 26 |
+
WORKDIR /home/user/app/acestep
|
| 27 |
+
|
| 28 |
+
# Install dependencies
|
| 29 |
+
RUN uv sync
|
| 30 |
+
|
| 31 |
+
# Write config for the API
|
| 32 |
+
RUN echo 'ACESTEP_CONFIG_PATH=acestep-v15-turbo\n\
|
| 33 |
+
ACESTEP_LM_MODEL_PATH=acestep-5Hz-lm-0.6B\n\
|
| 34 |
+
ACESTEP_LM_BACKEND=pt\n\
|
| 35 |
+
PORT=7860\n\
|
| 36 |
+
LANGUAGE=en' > .env
|
| 37 |
+
|
| 38 |
+
# HF Spaces requires port 7860
|
| 39 |
+
EXPOSE 7860
|
| 40 |
+
|
| 41 |
+
# Start the ACE-Step API
|
| 42 |
+
CMD ["uv", "run", "acestep-api"]
|