CandidateExplorer / Dockerfile
ishaq101's picture
fix dockerfile
ea3ee44
raw
history blame contribute delete
591 Bytes
FROM python:3.13-slim-bookworm
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
UV_COMPILE_BYTECODE=1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --system app && \
adduser --system --group --home /home/app app
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen
COPY . .
RUN chown -R app:app /app
USER app
EXPOSE 7860
CMD ["uv", "run", "--no-sync", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]