dhruvAI / Dockerfile
KRISH09bha's picture
Update Dockerfile
15fbec4 verified
raw
history blame contribute delete
818 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 --no-install-recommends \
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
git \
gcc \
build-essential \
curl \
&& apt-get clean \
&& 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 --no-cache-dir -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"]