diff --git a/.github/workflows/build-worker70.yml b/.github/workflows/build-worker70.yml new file mode 100644 index 0000000..fea2c1f --- /dev/null +++ b/.github/workflows/build-worker70.yml @@ -0,0 +1,41 @@ +name: build-worker70 +# Cloud build for the 70B GPTQ worker (Samantha meme arm) — no local docker. +# Builds live/Dockerfile.worker70 and pushes to ghcr. + +on: + push: + branches: [master] + paths: ["live/Dockerfile.worker70", "live/worker.py", "live/server.py", + "live/requirements.txt"] + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: ./live + file: ./live/Dockerfile.worker70 + push: true + tags: | + ghcr.io/terrafying/saw-chamber-worker-70b:v1 + ghcr.io/terrafying/saw-chamber-worker-70b:latest + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/live/Dockerfile.worker70 b/live/Dockerfile.worker70 new file mode 100644 index 0000000..265831b --- /dev/null +++ b/live/Dockerfile.worker70 @@ -0,0 +1,26 @@ +FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime + +# 70B GPTQ variant of the saw chamber serverless worker (Samantha meme arm). +# Same code as Dockerfile.worker plus auto-gptq/optimum so transformers 4.51 +# can load TheBloke GPTQ checkpoints. Steering hooks still see the residual +# stream after dequant — exp37b recipe unchanged, just a bigger model. + +RUN apt-get update -qq && apt-get install -y -qq wget && rm -rf /var/lib/apt/lists/* + +COPY requirements.txt /app/requirements.txt +RUN pip install --no-cache-dir "numpy<2" "transformers==4.51.3" accelerate \ + "optimum>=1.21" "auto-gptq==0.7.1" runpod && \ + pip install --no-cache-dir "torch==2.4.0" --index-url https://download.pytorch.org/whl/cu121 && \ + python -c "import torch, transformers, auto_gptq; print(f' baked {torch.__version__} {transformers.__version__}')" + +COPY worker.py /app/live/worker.py +COPY server.py /app/live/server.py + +ENV CHAMBER_DEVICE=cuda \ + CHAMBER_DTYPE=float16 \ + CHAMBER_MODEL=TheBloke/Samantha-1.1-70B-GPTQ \ + CHAMBER_LAYER=40 \ + HF_HOME=/workspace/hf + +WORKDIR /app/live +CMD ["python", "-u", "worker.py"]