Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit a4bafd6

Browse files
committed
docker update
1 parent d71b73e commit a4bafd6

File tree

4 files changed

+41
-5
lines changed

4 files changed

+41
-5
lines changed

pod-start.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import runpod
2+
import re
3+
import os
4+
5+
API_KEY = os.getenv("RUNPOD_API_KEY")
6+
runpod.api_key = API_KEY
7+
8+
# Replace with the actual template ID
9+
TEMPLATE_ID = "oqfjo3fqxu"
10+
11+
# Fetch running instances
12+
running_pods = runpod.get_pods()
13+
manav_nums = []
14+
15+
# Extract existing numbers from instance names
16+
for pod in running_pods:
17+
match = re.match(r"manav-(\d+)", pod["name"])
18+
if match:
19+
manav_nums.append(int(match.group(1)))
20+
21+
# Determine the next available number
22+
num = max(manav_nums) + 1 if manav_nums else 1
23+
print(f"Starting instance with number: {num}")
24+
25+
pod_config = {
26+
"name": f"manav-{num}",
27+
"image_name": "manav",
28+
"template_id": TEMPLATE_ID,
29+
"gpu_type_id": "NVIDIA A40",
30+
"cloud_type": "SECURE",
31+
# "region": "CA-MTL-1",
32+
"network_volume_id": "fbrfv5xpc9", # Attach external disk
33+
"env": {}, # Add any required environment variables here
34+
"docker_args": "", # Any specific Docker arguments
35+
}
36+
37+
pod = runpod.create_pod(**pod_config)
38+
print(pod)

runpod/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base image
2-
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
2+
FROM pytorch/pytorch:2.6.0-cuda12.6-cudnn9-devel
33

44
# Update keys and repositories
55
RUN apt-get update

runpod/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
beartype
2+
black
23
classifier-free-guidance-pytorch
34
einops
45
einx[torch]

runpod/start.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ start_jupyter() {
8585
# Main Program #
8686
# ---------------------------------------------------------------------------- #
8787

88-
start_nginx
88+
# start_nginx
8989

9090
execute_script "/pre_start.sh" "Running pre-start script..."
9191

@@ -95,9 +95,6 @@ setup_ssh
9595
start_jupyter
9696
export_env_vars
9797

98-
mkdir /tmp/ramdisk
99-
mount -t tmpfs -o size=4G tmpfs /tmp/ramdisk
100-
10198
execute_script "/post_start.sh" "Running post-start script..."
10299

103100
echo "Start script(s) finished, pod is ready to use."

0 commit comments

Comments
 (0)