Theo / Dockerfile
alaselababatunde's picture
Updated
02b3d0d
raw
history blame
819 Bytes
# ==============================================================
# Tech Disciples AI Backend — Dockerfile
# ==============================================================
# Use lightweight official Python image
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
APP_HOME=/app
# Set work directory
WORKDIR $APP_HOME
# System dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirement file first (for caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Expose port for FastAPI
EXPOSE 7860
# Run the FastAPI app with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]