Skip to content

Commit

Permalink
Archive sky-ex code
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Oct 12, 2024
1 parent e84f7b1 commit 5dd4563
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 57 deletions.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions archived/sky-xp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These files were in `yard-rs` and had path assumptions that are no longer valid after the arhchiving.
File renamed without changes.
File renamed without changes.
57 changes: 57 additions & 0 deletions archived/sky-xp/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
prep-dstack:
@echo "run this first: pyenv shell 3.11"
pip install "dstack[all]" -U

# not a fan of the idea of needing a server or a registration on https://sky.dstack.ai/
# only the latter works on CI
# ds:
# nohup dstack server &

@init-dstack:
echo "config backends on https://sky.dstack.ai/ then run dstack config --url https://sky.dstack.ai [more options]"
echo "then run: dstack init"
# need to setup backends in http://127.0.0.1:3000/projects/main first
# see https://dstack.ai/docs/reference/server/config.yml/#runpod

# dstack seems to have extra difficulty requesting resources, it always takes a long time, and mostly fails

gdev:
dstack apply -f dev.dstack.yml

grun:
yes|dstack apply -y -f task.dstack.yml

prep-sky:
@echo "run this first: pyenv shell 3.11"
pip install runpod
pip install "skypilot-nightly[runpod]"
runpod config
sky check runpod

# https://skypilot.readthedocs.io/en/latest/examples/interactive-development.html
# # -i 5 stop Stopping not supported
# --use-spot Catalog does not contain any instances satisfying the request
# not a fan of using ForwardAgent, it's a dealbreaker
# see https://github.com/skypilot-org/skypilot/blob/fdd68b209ee74f9282fac5c6834907d5fe72d255/sky/utils/command_runner.py#L57
skyup:
cd {{justfile_directory()}}; yes|sky launch -c hello hello.sky.yml

skydown:
cd {{justfile_directory()}}; yes|sky down hello

skyrun +PARAMS:
cd {{justfile_directory()}}; sky exec hello {{PARAMS}}

skyssh:
cd {{justfile_directory()}}; ssh hello

skysee:
cd {{justfile_directory()}}; sky show-gpus -a|grep -i runpod|grep -F "$ 0."

skykill:
#!/usr/bin/env python
import runpod
import os
runpod.api_key = os.getenv("RUNPOD_API_KEY")
pod_id = os.getenv("RUNPOD_POD_ID")
runpod.terminate_pod(pod_id)
File renamed without changes.
58 changes: 1 addition & 57 deletions yard-rs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,60 +103,4 @@ rm-ex NAME:
mp:
just try-compute multi_pass

prep-dstack:
@echo "run this first: pyenv shell 3.11"
pip install "dstack[all]" -U

# not a fan of the idea of needing a server or a registration on https://sky.dstack.ai/
# only the latter works on CI
# ds:
# nohup dstack server &

@init-dstack:
echo "config backends on https://sky.dstack.ai/ then run dstack config --url https://sky.dstack.ai [more options]"
echo "then run: dstack init"
# need to setup backends in http://127.0.0.1:3000/projects/main first
# see https://dstack.ai/docs/reference/server/config.yml/#runpod

# dstack seems to have extra difficulty requesting resources, it always takes a long time, and mostly fails

gdev:
dstack apply -f dev.dstack.yml

grun:
yes|dstack apply -y -f task.dstack.yml

prep-sky:
@echo "run this first: pyenv shell 3.11"
pip install runpod
pip install "skypilot-nightly[runpod]"
runpod config
sky check runpod

# https://skypilot.readthedocs.io/en/latest/examples/interactive-development.html
# # -i 5 stop Stopping not supported
# --use-spot Catalog does not contain any instances satisfying the request
# not a fan of using ForwardAgent, it's a dealbreaker
# see https://github.com/skypilot-org/skypilot/blob/fdd68b209ee74f9282fac5c6834907d5fe72d255/sky/utils/command_runner.py#L57
skyup:
cd {{justfile_directory()}}; yes|sky launch -c hello hello.sky.yml

skydown:
cd {{justfile_directory()}}; yes|sky down hello

skyrun +PARAMS:
cd {{justfile_directory()}}; sky exec hello {{PARAMS}}

skyssh:
cd {{justfile_directory()}}; ssh hello

skysee:
cd {{justfile_directory()}}; sky show-gpus -a|grep -i runpod|grep -F "$ 0."

skykill:
#!/usr/bin/env python
import runpod
import os
runpod.api_key = os.getenv("RUNPOD_API_KEY")
pod_id = os.getenv("RUNPOD_POD_ID")
runpod.terminate_pod(pod_id)

0 comments on commit 5dd4563

Please sign in to comment.