Spaces:
Runtime error
Runtime error
File size: 1,794 Bytes
6502388 3b417f0 6502388 3b417f0 6502388 3b417f0 6502388 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | FROM python:3.11-slim
WORKDIR /app
# Install system dependencies (git, ffmpeg, audio libs, curl, build tools)
RUN apt-get update && apt-get install -y \
git \
ffmpeg \
libsndfile1 \
curl \
build-essential \
libgomp1 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Set environment variables for the new user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Install uv (modern Python package manager used by ACE-Step)
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone the ACE-Step 1.5 repository (official GitHub source)
RUN git clone --depth 1 https://github.com/ACE-Step/ACE-Step-1.5.git acestep-repo
# Set environment variables for Gradio server and persistent Hugging Face / cache storage
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
ENV GRADIO_ANALYTICS_ENABLED=False
ENV TOKENIZERS_PARALLELISM=false
ENV TORCHAUDIO_USE_TORCHCODEC=0
ENV HF_HOME=/data/.cache/huggingface
ENV TRANSFORMERS_CACHE=/data/.cache/huggingface
ENV TORCH_HOME=/data/.cache/torch
ENV ACESTEP_HOME=/data
ENV PYTHONUNBUFFERED=1
# Sync Python dependencies using uv (reads pyproject.toml from the repo)
WORKDIR /app/acestep-repo
RUN uv sync
# Create persistent storage directories so models, cache, and outputs survive restarts
RUN mkdir -p /data/.cache/huggingface /data/models /data/output /data/outputs
# Expose the Gradio port
EXPOSE 7860
# Start the ACE-Step Gradio interface via uv run
CMD cd /app/acestep-repo && \
mkdir -p /data/.cache/huggingface /data/models /data/output /data/outputs && \
echo "Starting ACE-Step v1.5 Gradio interface..." && \
echo "Models and cache are stored in /data for persistence" && \
uv run acestep
|