32 lines
612 B
Docker
32 lines
612 B
Docker
# Use NVIDIA CUDA 12.6 image for compatibility
|
|
FROM nvidia/cuda:12.6.2-devel-ubuntu22.04
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
python3 \
|
|
python3-pip \
|
|
git \
|
|
ffmpeg \
|
|
libsndfile1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application files
|
|
COPY . .
|
|
|
|
# Set environment variables
|
|
ENV MODEL_ID="nari-labs/Dia-1.6B"
|
|
ENV PORT=8000
|
|
|
|
# Expose API port
|
|
EXPOSE 8000
|
|
|
|
# Run the FastAPI server
|
|
CMD ["python3", "main.py"]
|