diff --git a/README.md b/README.md index dd1d981..f359d40 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ **ClimbingBoardGPT** is a unified transformer-style modeling project for climbing-board routes on: -- **Tension Board 2 Mirror** -- **Kilter Board Original** +- **Tension Board 2 Mirror** (12ftx12ft) +- **Kilter Board Original** (16ftx12ft) The project treats climbing-board problems as symbolic sequences of board-aware hold-role tokens. It supports: @@ -637,6 +637,7 @@ models/joint_route_gpt_generator.pth models/joint_transformer_grade_predictor.pth data/processed/tokenized/token_metadata.csv data/processed/tokenized/token_vocab.json +data/processed/tokenized/route_sequences.csv configs/ images/ src/climbingboardgpt/ @@ -675,7 +676,9 @@ Example prediction payload: } ``` -Board-size-specific generation is a planned future extension. For now, the demo uses the full TB2 12x12 and Kilter 16x12-style background images and placement sets. +# Future Work +- Board-size-specific generation is a planned future extension. For now, the demo uses the full TB2 12x12 and Kilter 16x12-style background images and placement sets. +- "No Match" token and "No Match" options in the demo. diff --git a/docker-compose.webapp.yml b/docker-compose.webapp.yml index 2fd5f63..2625bc1 100644 --- a/docker-compose.webapp.yml +++ b/docker-compose.webapp.yml @@ -2,7 +2,7 @@ services: climbingboardgpt-webapp: build: context: . - dockerfile: Dockerfile.webapp + dockerfile: webapp/Dockerfile container_name: climbingboardgpt-webapp restart: unless-stopped ports: diff --git a/webapp/Dockerfile b/webapp/Dockerfile index b417790..45e2c7a 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -1,24 +1,35 @@ -FROM python:3.11-slim +FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 WORKDIR /app -RUN apt-get update \ - && apt-get install -y --no-install-recommends build-essential \ - && rm -rf /var/lib/apt/lists/* +# Install CPU-only PyTorch first (separate index, ~200MB vs ~2.5GB) +RUN pip install --no-cache-dir \ + --index-url https://download.pytorch.org/whl/cpu \ + torch -COPY requirements.txt pyproject.toml README.md ./ +# Install only runtime dependencies (no matplotlib, jupyter, etc.) +COPY pyproject.toml README.md ./ COPY src ./src + +RUN pip install --no-cache-dir -e . \ + --no-deps \ + && pip install --no-cache-dir \ + numpy \ + pandas \ + scipy \ + matplotlib \ + scikit-learn \ + fastapi \ + "uvicorn[standard]" \ + pydantic + COPY configs ./configs COPY images ./images COPY webapp ./webapp -RUN pip install --no-cache-dir --upgrade pip \ - && pip install --no-cache-dir fastapi "uvicorn[standard]" pydantic \ - && pip install --no-cache-dir -e . - EXPOSE 8055 CMD ["uvicorn", "webapp.app:app", "--host", "0.0.0.0", "--port", "8055"] \ No newline at end of file