Pruthvi1762/cloud-devops-openenv
0
1# Use a reliable mirror for the base image to avoid Docker Hub throttling2FROM public.ecr.aws/docker/library/python:3.11-slim-bookworm3 4# Set environment variables5ENV PYTHONDONTWRITEBYTECODE=1 \6 PYTHONUNBUFFERED=1 \7 PATH="/app/.venv/bin:$PATH"8 9# Set the working directory10WORKDIR /app11 12# Install system dependencies if any13RUN apt-get update && apt-get install -y --no-install-recommends \14 build-essential \15 && rm -rf /var/lib/apt/lists/*16 17# Install uv18RUN pip install --no-cache-dir uv19 20# Copy dependencies first for caching21COPY pyproject.toml uv.lock ./22 23# Install project dependencies using uv24RUN uv sync --no-dev --no-install-project25 26# Copy the rest of the application27COPY . .28 29# Install the project itself in editable mode so 'server' script is available30RUN pip install -e .31 32# Expose the standard port for Hugging Face Spaces33EXPOSE 786034 35# Run the project script 'server'36CMD ["server"]37 