Spaces:
Running
Running
File size: 760 Bytes
263914c dcdf1dd 263914c |
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 |
# Use official Python slim image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PIP_ROOT_USER_ACTION=ignore
ENV MUSIC_COMPOSER_BASE_PATH=/tmp
ENV OUTPUT_WAV=/tmp/output.wav
ENV IS_DOCKER=True
ENV SERVER_PORT=7860
ENV HOME=/root
ENV NEW_STATIC_PATH=/tmp
COPY requirements-system.txt .
# Install OS-level dependencies
RUN apt-get update && \
xargs apt-get install -y --no-install-recommends < /app/requirements-system.txt && \
rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir --force-reinstall -r requirements.txt
# Copy app code
COPY . .
# Expose app port
EXPOSE 7860
# Run the app
CMD ["python", "main.py"]
|