bitsat_predictor/backend/Dockerfile
pranav d18a0fb3b6
migration & deployment on cloudflare pages and huggingface spaces (#3)
* migrations: switching over from pip to uv as pkg-manager & adding wrangler.toml file for cloudflare deployment-ease

* fix: resolving mismatch in name in wrangler.toml file

* fix: downgrading required-python version && updating to current date in wrangler.toml file for latest-runtime capabilities

* fix: removing uvicorn as a server-service from deployment

* migrations: refactored frontend to use bun as default pkg-manager over npm, downsized plotly to use minimum number of components to aptly reduce bundling space & dockerfile and sdk on huggingspace for backend logic

* fix: removed buildinfo files, removed unnecessary tsconfig settings which was previously used in bun build to check local builds, resolving components in Header.tsx, resetting isLoaded state in GraphPlot.tsx file
2026-02-13 01:24:16 +05:30

15 lines
329 B
Docker

FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY . .
ENV PATH="/app/.venv/bin:$PATH"
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]