Spaces:
Building
on
Zero
Building
on
Zero
Gong Junmin
commited on
Commit
·
f527e35
1
Parent(s):
b8a3728
support nano vllm docker
Browse files- Dockerfile +45 -0
- README.md +2 -4
- requirements.txt +0 -3
Dockerfile
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use official Python image with CUDA support for HuggingFace Space
|
| 2 |
+
FROM python:3.11-slim
|
| 3 |
+
|
| 4 |
+
# Set environment variables
|
| 5 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
+
ENV PYTHONUNBUFFERED=1
|
| 7 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 8 |
+
ENV GRADIO_SERVER_PORT=7860
|
| 9 |
+
|
| 10 |
+
# Install system dependencies
|
| 11 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 12 |
+
git \
|
| 13 |
+
ffmpeg \
|
| 14 |
+
libsndfile1 \
|
| 15 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
+
|
| 17 |
+
# Create non-root user for HuggingFace Space
|
| 18 |
+
RUN useradd -m -u 1000 user
|
| 19 |
+
USER user
|
| 20 |
+
ENV HOME=/home/user
|
| 21 |
+
ENV PATH=/home/user/.local/bin:$PATH
|
| 22 |
+
|
| 23 |
+
# Set working directory
|
| 24 |
+
WORKDIR $HOME/app
|
| 25 |
+
|
| 26 |
+
# Copy requirements first for better caching
|
| 27 |
+
COPY --chown=user:user requirements.txt .
|
| 28 |
+
|
| 29 |
+
# Copy the local nano-vllm package
|
| 30 |
+
COPY --chown=user:user acestep/third_parts/nano-vllm $HOME/app/acestep/third_parts/nano-vllm
|
| 31 |
+
|
| 32 |
+
# Install nano-vllm first (local package)
|
| 33 |
+
RUN pip install --no-cache-dir --user $HOME/app/acestep/third_parts/nano-vllm
|
| 34 |
+
|
| 35 |
+
# Install remaining dependencies
|
| 36 |
+
RUN pip install --no-cache-dir --user -r requirements.txt
|
| 37 |
+
|
| 38 |
+
# Copy the rest of the application
|
| 39 |
+
COPY --chown=user:user . .
|
| 40 |
+
|
| 41 |
+
# Expose port
|
| 42 |
+
EXPOSE 7860
|
| 43 |
+
|
| 44 |
+
# Run the application
|
| 45 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
|
@@ -3,10 +3,8 @@ title: ACE-Step v1.5
|
|
| 3 |
emoji: 🎵
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
python_version: 3.11
|
| 9 |
-
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
short_description: Music Generation Foundation Model v1.5
|
|
|
|
| 3 |
emoji: 🎵
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
|
|
|
|
|
|
| 8 |
pinned: false
|
| 9 |
license: mit
|
| 10 |
short_description: Music Generation Foundation Model v1.5
|
requirements.txt
CHANGED
|
@@ -7,9 +7,6 @@ torch>=2.9.1; sys_platform != 'win32'
|
|
| 7 |
torchaudio>=2.9.1; sys_platform != 'win32'
|
| 8 |
torchvision; sys_platform != 'win32'
|
| 9 |
|
| 10 |
-
# Local packages (must be installed before other dependencies that might use them)
|
| 11 |
-
./acestep/third_parts/nano-vllm
|
| 12 |
-
|
| 13 |
# Core dependencies
|
| 14 |
transformers>=4.51.0
|
| 15 |
diffusers
|
|
|
|
| 7 |
torchaudio>=2.9.1; sys_platform != 'win32'
|
| 8 |
torchvision; sys_platform != 'win32'
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# Core dependencies
|
| 11 |
transformers>=4.51.0
|
| 12 |
diffusers
|