dubswayAgenticV2 / Dockerfile
peace2024's picture
Update Dockerfile
0889e65
raw
history blame
748 Bytes
# Use a lightweight Python image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system-level dependencies
RUN apt-get update && \
apt-get install -y ffmpeg libsndfile1 wget curl git && \
rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker layer caching
COPY requirements.txt .
# Upgrade pip and install dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the entire app source code
COPY . .
# Expose port 7860 (used by Hugging Face Spaces)
EXPOSE 7860
# Set environment variables (if needed)
ENV PYTHONUNBUFFERED=1
# Run the FastAPI app via Uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]