ewere / Dockerfile
andevs's picture
Update Dockerfile
38c0415 verified
Raw
History Blame Contribute Delete
751 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies - FIXED package names for Debian trixie
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libgomp1 \
wget \
git \
ffmpeg \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy application
COPY . .
# Create non-root user
RUN useradd -m -u 1000 user && chown -R user:user /app
USER user
# Expose port
EXPOSE 7860
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]