mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-09 09:20:04 +00:00
Merge 8c436663a5 into dc54a1a307
This commit is contained in:
commit
c066feedba
20
dev/providers/runpod/Dockerfile
Normal file
20
dev/providers/runpod/Dockerfile
Normal 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
|
||||
40
dev/providers/runpod/build_and_push.sh
Executable file
40
dev/providers/runpod/build_and_push.sh
Executable 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
|
||||
Loading…
Reference in New Issue
Block a user