dhruvAI / Dockerfile
KRISH09bha's picture
Update Dockerfile
016001c verified
raw
history blame contribute delete
765 Bytes
# Use an official Python base image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Create and set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libgl1-mesa-glx \
git \
gcc \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file to the container
COPY requirements.txt .
# Install Python dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy all code from your repo root into /app
COPY . .
# Expose port for the API
EXPOSE 7860
# Run the app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]