Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

prepare_ax.sh 1.8 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  1. #!/bin/bash
  2. #
  3. # Container source: https://github.com/OpenAccess-AI-Collective/axolotl/blob/main/docker/Dockerfile-runpod
  4. #
  5. #
  6. # To run this in RunPod with `winglian/axolotl-runpod:main-cu118-2.0.0`, set
  7. # Expose HTTP Ports (Max 10): 7860,8888
  8. # docker command: `bash -c "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/utensil/llm-playground/main/scripts/entry/prepare_ax.sh -sSf | bash"`
  9. # JUPYTER_PASSWORD change to your secret
  10. # HUGGINGFACE_TOKEN change to your token from https://huggingface.co/settings/tokens
  11. # WORKSPACE /workspace/
  12. # WANDB_API_KEY change to your key from https://wandb.ai/authorize
  13. #
  14. # To test this in Codespaces, run `cd /workspaces/ && WORKSPACE=/workspaces/ llm-playground/scripts/entry/prepare_ax.sh`
  15. set -euxo pipefail
  16. set -x
  17. WORKSPACE=${WORKSPACE:-"/workspace"}
  18. cd $WORKSPACE
  19. if [ ! -d "llm-playground" ]; then
  20. git clone https://github.com/utensil/llm-playground
  21. fi
  22. cd llm-playground
  23. export DEBIAN_FRONTEND=noninteractive
  24. apt-get update
  25. apt-get install -y aria2
  26. git lfs install
  27. pip install requests huggingface_hub
  28. cd $WORKSPACE/llm-playground
  29. LOAD_MODEL=${LOAD_MODEL:-""}
  30. LOAD_DATASET=${LOAD_DATASET:-""}
  31. if [ ! -z "$LOAD_MODEL" ]; then
  32. python ./helper/download-model.py $LOAD_MODEL
  33. fi
  34. if [ ! -z "$LOAD_DATASET" ]; then
  35. python ./helper/download-dataset.py $LOAD_DATASET
  36. fi
  37. mkdir -p $WORKSPACE/llm-playground/models
  38. mkdir -p $WORKSPACE/llm-playground/loras
  39. mkdir -p $WORKSPACE/llm-playground/datasets
  40. python ./helper/storage.py
  41. # prepare jupyter
  42. pip install jupyterhub notebook jupyterlab jupyterlab-git ipywidgets
  43. # prepare monitoring GPU
  44. pip install nvitop
  45. cp -r $WORKSPACE/llm-playground/notebooks/axolotl/config/* $WORKSPACE/axolotl/examples/
  46. JUPYTER_PASSWORD=${JUPYTER_PASSWORD:-"pytorch"}
  47. bash $WORKSPACE/llm-playground/scripts/nohup_jupyter.sh
  48. sleep infinity
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...