This commit is contained in:
Daniel Dudek 2026-05-05 19:52:27 +02:00 committed by GitHub
commit c066feedba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,20 @@
FROM runpod/pytorch:1.0.3-cu1281-torch291-ubuntu2404
# ── System packages ──────────────────────────────────────────────────────────
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y git nano curl ca-certificates screen && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# ── Python dependencies (into system Python, torch already in base image) ───
RUN pip install --no-cache-dir \
"datasets>=4.0.0" \
"fastapi>=0.117.1" \
"kernels>=0.11.7" \
"psutil>=7.1.0" \
"rustbpe>=0.1.0" \
"tiktoken>=0.11.0" \
"tokenizers>=0.22.0" \
"uvicorn>=0.36.0" \
"wandb>=0.21.3"
WORKDIR /workspace

View File

@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
usage() {
echo "Usage: $0 <docker-hub-repo> [tag] [--no-push]"
echo ""
echo "Examples:"
echo " $0 myuser/nanochat-runpod"
echo " $0 myuser/nanochat-runpod v1.0"
echo " $0 myuser/nanochat-runpod latest --no-push"
exit 1
}
[[ $# -lt 1 ]] && usage
DOCKER_REPO="$1"
TAG="${2:-latest}"
NO_PUSH=false
for arg in "$@"; do
[[ "$arg" == "--no-push" ]] && NO_PUSH=true
done
IMAGE="${DOCKER_REPO}:${TAG}"
echo ">>> Building ${IMAGE} ..."
docker build -t "$IMAGE" "$SCRIPT_DIR"
echo ">>> Built ${IMAGE}"
if [[ "$NO_PUSH" == true ]]; then
echo ">>> Skipping push (--no-push)"
else
echo ">>> Pushing ${IMAGE} ..."
docker push "$IMAGE"
echo ">>> Pushed ${IMAGE}"
fi