paddle 1.2.3__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {paddle-1.2.3 → paddle-1.2.4}/.bumpversion.cfg +1 -1
- paddle-1.2.4/Makefile +111 -0
- {paddle-1.2.3 → paddle-1.2.4}/PKG-INFO +21 -1
- {paddle-1.2.3 → paddle-1.2.4}/README.md +20 -0
- paddle-1.2.4/deploy.yaml +83 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/Dockerfile.cuda +3 -0
- paddle-1.2.4/docker/requirements.txt +7 -0
- paddle-1.2.4/docker-compose.override.yaml.tmp1 +19 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/__init__.py +1 -1
- {paddle-1.2.3 → paddle-1.2.4}/pyproject.toml +1 -1
- paddle-1.2.4/run.sh +28 -0
- paddle-1.2.3/Makefile +0 -61
- paddle-1.2.3/docker/requirements.txt +0 -2
- {paddle-1.2.3 → paddle-1.2.4}/.github/workflows/cd.yml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/.github/workflows/ci.yml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/.gitignore +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/.pre-commit-config.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/LICENSE +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/.dockerignore +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/Dockerfile +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/entrypoint.sh +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/nvim/init.lua +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/nvim/lua/plugins.lua +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/scripts/git-done +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker/scripts/git-send +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker-compose.override.yaml.tmp +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docker-compose.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/_static/readme-attach.png +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/_static/readme-extension.png +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/_static/readme-open-folder.png +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/_static/temp_paddle.jpg +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/images/2d.straka-theta.png +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/images/ncview-tutorial-straka.png +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/installation_notes/installation_notes.txt +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/notebooks/.gitignore +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/notebooks/Tutorial-1-SaturnAdiabat.ipynb +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/notebooks/Tutorial-Straka.ipynb +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/docs/content/notebooks/distribute.md +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/.gitignore +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/jupiter_crm.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/jupiter_crm_dry.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/jupiter_gcm.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/jupiter_gcm_dry.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/robert.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/robert.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/run_hydro.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/saturn1d.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/shallow_splash.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/shallow_splash.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/shallow_yz.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/shallow_yz.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/shock.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/shock.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/straka.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/straka.yaml +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/example_py_scripts/test_saturn_adiabat.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/crm.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/cubed_sphere_ui.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/cubed_sphere_utils.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/evolve_kinetics.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/example_save.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/find_init_params.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/nc2pt.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/plot_cubed_sphere_panel.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/pt2nc.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/setup_profile.py +0 -0
- {paddle-1.2.3 → paddle-1.2.4}/paddle/write_profile.py +0 -0
paddle-1.2.4/Makefile
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
ENV_FILE := .env
|
|
2
|
+
UID := $$(id -u)
|
|
3
|
+
GID := $$(id -g)
|
|
4
|
+
GITCONFIG := $${HOME}/.gitconfig
|
|
5
|
+
GITCREDENTIALS := $${HOME}/.git-credentials
|
|
6
|
+
DATE_STRING := $(shell date "+%Y-%m-%d")
|
|
7
|
+
JOB := canoe$(date +%Y%m%d_%H%M%S)
|
|
8
|
+
|
|
9
|
+
.PHONY: help env up down ps start build deploy finish log status mint upload node resource
|
|
10
|
+
|
|
11
|
+
# Show help for each target
|
|
12
|
+
help: ## Show this help message
|
|
13
|
+
@echo "Available commands:"
|
|
14
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
|
15
|
+
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
|
|
16
|
+
|
|
17
|
+
env: ## Generate the .env file with git configs first, then user info
|
|
18
|
+
@# Check if either variable is missing
|
|
19
|
+
@if ! grep -q '^GITCONFIG=' $(ENV_FILE) 2>/dev/null || \
|
|
20
|
+
! grep -q '^GITCREDENTIALS=' $(ENV_FILE) 2>/dev/null; then \
|
|
21
|
+
if [ -f "$${HOME}/.gitconfig" ]; then \
|
|
22
|
+
echo "GITCONFIG=$${HOME}/.gitconfig" > $(ENV_FILE); \
|
|
23
|
+
else \
|
|
24
|
+
touch "$${HOME}/.gitconfig"; \
|
|
25
|
+
echo "GITCONFIG=$${HOME}/.gitconfig" > $(ENV_FILE); \
|
|
26
|
+
fi; \
|
|
27
|
+
if [ -f "$${HOME}/.git-credentials" ]; then \
|
|
28
|
+
echo "GITCREDENTIALS=$${HOME}/.git-credentials" >> $(ENV_FILE); \
|
|
29
|
+
else \
|
|
30
|
+
touch "$${HOME}/.git-credentials"; \
|
|
31
|
+
echo "[credential]" >> "$${HOME}/.gitconfig"; \
|
|
32
|
+
echo " helper = store" >> "$${HOME}/.gitconfig"; \
|
|
33
|
+
echo "GITCREDENTIALS=$${HOME}/.git-credentials" >> $(ENV_FILE); \
|
|
34
|
+
fi; \
|
|
35
|
+
echo "USER=$$(id -un)" >> $(ENV_FILE); \
|
|
36
|
+
echo "USER_UID=$$(id -u)" >> $(ENV_FILE); \
|
|
37
|
+
echo "USER_GID=$$(id -g)" >> $(ENV_FILE); \
|
|
38
|
+
echo "Created $(ENV_FILE):"; cat $(ENV_FILE); \
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
up: env ## Start docker containers in the background
|
|
42
|
+
@docker compose up -d
|
|
43
|
+
@docker compose exec dev bash -c '\
|
|
44
|
+
USER_HOME=$$(eval echo ~$$USERNAME); \
|
|
45
|
+
if [ -f /etc/git-credentials ] && [ ! -f $$USER_HOME/.git-credentials ]; then \
|
|
46
|
+
cp /etc/git-credentials $$USER_HOME/.git-credentials; \
|
|
47
|
+
chown $${USER_UID}:$${USER_GID} $$USER_HOME/.git-credentials; \
|
|
48
|
+
git config --global credential.helper store; \
|
|
49
|
+
fi \
|
|
50
|
+
'
|
|
51
|
+
|
|
52
|
+
down: env ## Stop and remove docker containers
|
|
53
|
+
@docker compose down
|
|
54
|
+
|
|
55
|
+
ps: env ## Show container status
|
|
56
|
+
@docker compose ps
|
|
57
|
+
|
|
58
|
+
start: env ## Open a bash shell inside the 'dev' container as the host user, exit without error
|
|
59
|
+
@docker compose exec --user $(UID):$(GID) dev \
|
|
60
|
+
bash -c 'git config --global --add safe.directory /paddle; source /opt/venv/bin/activate; exec bash'
|
|
61
|
+
|
|
62
|
+
build: env ## Build (or rebuild) the 'dev' container and start it
|
|
63
|
+
@docker compose up -d --build dev
|
|
64
|
+
|
|
65
|
+
deploy: env ## Deploy a multi-node job to cluster
|
|
66
|
+
@USER_UID="$$(id -u)" USER_GID="$$(id -g)" docker stack deploy -c deploy.yaml ${JOB}
|
|
67
|
+
@echo -e "\033[32m[OK]\033[0m ${JOB} deployed"
|
|
68
|
+
|
|
69
|
+
finish: ## Clean up the deployed job
|
|
70
|
+
@docker stack rm ${JOB}
|
|
71
|
+
|
|
72
|
+
log: ## Show the job log file
|
|
73
|
+
docker service logs ${JOB}_captain
|
|
74
|
+
|
|
75
|
+
status: ## Show the job status
|
|
76
|
+
docker service ps ${JOB}_captain
|
|
77
|
+
|
|
78
|
+
mint: ## Mint the current environment
|
|
79
|
+
# Remove any git credential files from the dev container before snapshotting
|
|
80
|
+
docker exec paddle-dev-1 bash -lc 'rm -f /etc/git-credentials /root/.git-credentials /home/*/.git-credentials 2>/dev/null || true'
|
|
81
|
+
docker commit paddle-dev-1 ubuntu22.04-cuda12.9-py3.10-canoe:latest
|
|
82
|
+
docker tag ubuntu22.04-cuda12.9-py3.10-canoe:latest docker.io/luminoctum/ubuntu22.04-cuda12.9-py3.10-canoe:${DATE_STRING}
|
|
83
|
+
|
|
84
|
+
upload: ## Upload the minted image to docker hub
|
|
85
|
+
# Refuse to push if the image still contains git credential files
|
|
86
|
+
docker run --rm docker.io/luminoctum/ubuntu22.04-cuda12.9-py3.10-canoe:${DATE_STRING} sh -c '\
|
|
87
|
+
if ls /home/*/.git-credentials >/dev/null 2>&1; then \
|
|
88
|
+
echo "Refusing to push image: git credential files detected inside the image." >&2; \
|
|
89
|
+
exit 1; \
|
|
90
|
+
fi \
|
|
91
|
+
'
|
|
92
|
+
docker push docker.io/luminoctum/ubuntu22.04-cuda12.9-py3.10-canoe:${DATE_STRING}
|
|
93
|
+
|
|
94
|
+
node: ## Show nodes in cluster
|
|
95
|
+
docker node ls
|
|
96
|
+
|
|
97
|
+
resource: ## Print out cluster resource
|
|
98
|
+
@printf "%-35s %-10s %-15s %-10s\n" "NODE" "CPUs" "MEMORY (GB)" "GPUs"
|
|
99
|
+
@printf "%-35s %-10s %-15s %-10s\n" "----" "----" "-----------" "----"
|
|
100
|
+
@for node in $$(docker node ls --format "{{.Hostname}}"); do \
|
|
101
|
+
RESOURCES=$$(docker node inspect $$node --format ' \
|
|
102
|
+
{{.Description.Resources.NanoCPUs}} \
|
|
103
|
+
{{.Description.Resources.MemoryBytes}} \
|
|
104
|
+
{{if .Description.Resources.GenericResources}}{{range .Description.Resources.GenericResources}}{{if .NamedResourceSpec}}{{.NamedResourceSpec.Kind}} {{else if .DiscreteResourceSpec}}{{.DiscreteResourceSpec.Kind}} {{end}}{{end}}{{else}}0{{end}}'); \
|
|
105
|
+
\
|
|
106
|
+
CPUS=$$(echo $$RESOURCES | awk '{print $$1 / 1000000000}'); \
|
|
107
|
+
MEM=$$(echo $$RESOURCES | awk '{print $$2 / 1024 / 1024 / 1024}'); \
|
|
108
|
+
GPU_COUNT=$$(echo $$RESOURCES | grep -o "gpu" | wc -l); \
|
|
109
|
+
\
|
|
110
|
+
printf "%-35s %-10s %-15.2f %-10s\n" $$node $$CPUS $$MEM $$GPU_COUNT; \
|
|
111
|
+
done
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: paddle
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: Python Atmospheric Dynamics: Discovery and Learning about Exoplanets. An open-source, user-friendly python frontend of canoe
|
|
5
5
|
Project-URL: Homepage, https://github.com/elijah-mullens/paddle
|
|
6
6
|
Project-URL: Repository, https://github.com/elijah-mullens/paddle
|
|
@@ -158,3 +158,23 @@ Follow the steps below to set up your development environment.
|
|
|
158
158
|
## Troubleshooting
|
|
159
159
|
|
|
160
160
|
1. If you have Docker installed but do not have Docker Compose, remove your current Docker installation, which could be docker or docker.io, and re-install it following the guide provided in the [Develop with Docker](#develop-with-docker) section above.
|
|
161
|
+
|
|
162
|
+
2. If you run out of disk space while building the image. You can relocate the default location for container images:
|
|
163
|
+
Here is a simple recipe:
|
|
164
|
+
|
|
165
|
+
1. Generate config (if you don’t already have one):
|
|
166
|
+
```
|
|
167
|
+
sudo mkdir -p /etc/containerd
|
|
168
|
+
containerd config default | sudo tee /etc/containerd/config.toml >/dev/null
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
2. Edit `/etc/containerd/config.toml` and set:
|
|
172
|
+
```
|
|
173
|
+
root = "/home/containerd" # location where you have space
|
|
174
|
+
state = "/run/containerd"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
3. Restart
|
|
178
|
+
```
|
|
179
|
+
sudo systemctl restart containerd
|
|
180
|
+
```
|
|
@@ -127,3 +127,23 @@ Follow the steps below to set up your development environment.
|
|
|
127
127
|
## Troubleshooting
|
|
128
128
|
|
|
129
129
|
1. If you have Docker installed but do not have Docker Compose, remove your current Docker installation, which could be docker or docker.io, and re-install it following the guide provided in the [Develop with Docker](#develop-with-docker) section above.
|
|
130
|
+
|
|
131
|
+
2. If you run out of disk space while building the image. You can relocate the default location for container images:
|
|
132
|
+
Here is a simple recipe:
|
|
133
|
+
|
|
134
|
+
1. Generate config (if you don’t already have one):
|
|
135
|
+
```
|
|
136
|
+
sudo mkdir -p /etc/containerd
|
|
137
|
+
containerd config default | sudo tee /etc/containerd/config.toml >/dev/null
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
2. Edit `/etc/containerd/config.toml` and set:
|
|
141
|
+
```
|
|
142
|
+
root = "/home/containerd" # location where you have space
|
|
143
|
+
state = "/run/containerd"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
3. Restart
|
|
147
|
+
```
|
|
148
|
+
sudo systemctl restart containerd
|
|
149
|
+
```
|
paddle-1.2.4/deploy.yaml
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
version: "3.8"
|
|
2
|
+
|
|
3
|
+
networks:
|
|
4
|
+
raynet:
|
|
5
|
+
driver: overlay
|
|
6
|
+
attachable: true
|
|
7
|
+
|
|
8
|
+
services:
|
|
9
|
+
captain:
|
|
10
|
+
image: luminoctum/ubuntu22.04-cuda12.9-py3.10-canoe:2026-02-03
|
|
11
|
+
entrypoint: ["/bin/bash"]
|
|
12
|
+
user: "${USER_UID}:${USER_GID}"
|
|
13
|
+
networks:
|
|
14
|
+
- raynet
|
|
15
|
+
# args: run_command, master_addr, node_rank, proc_per_node, nodes
|
|
16
|
+
command: ['/work/run.sh', 'captain', '0', '1', '2']
|
|
17
|
+
deploy:
|
|
18
|
+
restart_policy:
|
|
19
|
+
condition: none
|
|
20
|
+
resources:
|
|
21
|
+
reservations:
|
|
22
|
+
generic_resources:
|
|
23
|
+
- discrete_resource_spec:
|
|
24
|
+
kind: gpu
|
|
25
|
+
value: 1
|
|
26
|
+
replicas: 1
|
|
27
|
+
placement:
|
|
28
|
+
constraints:
|
|
29
|
+
- node.labels.role == captain
|
|
30
|
+
environment:
|
|
31
|
+
- USERNAME=${USER}
|
|
32
|
+
- USER_UID=${USER_UID}
|
|
33
|
+
- USER_GID=${USER_GID}
|
|
34
|
+
- NVIDIA_VISIBLE_DEVICES=all
|
|
35
|
+
#- NCCL_DEBUG=INFO
|
|
36
|
+
- NCCL_SOCKET_IFNAME=eth0
|
|
37
|
+
#- NCCL_ASYNC_ERROR_HANDLING=1
|
|
38
|
+
volumes:
|
|
39
|
+
- .:/work
|
|
40
|
+
#- nfs:/data
|
|
41
|
+
working_dir: /work
|
|
42
|
+
|
|
43
|
+
crew1:
|
|
44
|
+
image: luminoctum/ubuntu22.04-cuda12.9-py3.10-canoe:2026-02-03
|
|
45
|
+
entrypoint: ["/bin/bash"]
|
|
46
|
+
user: "${USER_UID}:${USER_GID}"
|
|
47
|
+
networks:
|
|
48
|
+
- raynet
|
|
49
|
+
# args: run_command, master_addr, node_rank, proc_per_node, nodes
|
|
50
|
+
command: ['/work/run.sh', 'captain', '1', '1', '2']
|
|
51
|
+
deploy:
|
|
52
|
+
restart_policy:
|
|
53
|
+
condition: none
|
|
54
|
+
resources:
|
|
55
|
+
reservations:
|
|
56
|
+
generic_resources:
|
|
57
|
+
- discrete_resource_spec:
|
|
58
|
+
kind: gpu
|
|
59
|
+
value: 1
|
|
60
|
+
replicas: 1
|
|
61
|
+
placement:
|
|
62
|
+
constraints:
|
|
63
|
+
- node.labels.role == crew
|
|
64
|
+
environment:
|
|
65
|
+
- USERNAME=${USER}
|
|
66
|
+
- USER_UID=${USER_UID}
|
|
67
|
+
- USER_GID=${USER_GID}
|
|
68
|
+
- NVIDIA_VISIBLE_DEVICES=all
|
|
69
|
+
#- NCCL_DEBUG=INFO
|
|
70
|
+
- NCCL_SOCKET_IFNAME=eth0
|
|
71
|
+
#- NCCL_ASYNC_ERROR_HANDLING=1
|
|
72
|
+
volumes:
|
|
73
|
+
- .:/work
|
|
74
|
+
#- nfs:/data
|
|
75
|
+
working_dir: /work
|
|
76
|
+
|
|
77
|
+
volumes:
|
|
78
|
+
nfs:
|
|
79
|
+
driver: local
|
|
80
|
+
driver_opts:
|
|
81
|
+
type: "nfs"
|
|
82
|
+
o: "addr=coe-chengcli.turbo.storage.umich.edu,nfsvers=3,rw,nolock,soft"
|
|
83
|
+
device: ":/coe-chengcli"
|
|
@@ -24,8 +24,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
24
24
|
ripgrep fd-find unzip neovim \
|
|
25
25
|
clangd \
|
|
26
26
|
nodejs npm \
|
|
27
|
+
libnetcdf-dev nco ncview \
|
|
27
28
|
&& rm -rf /var/lib/apt/lists/*
|
|
28
29
|
|
|
30
|
+
RUN apt-get install libnccl2 libnccl-dev
|
|
31
|
+
|
|
29
32
|
# Make fd available as `fd` (Ubuntu calls it fdfind)
|
|
30
33
|
RUN update-alternatives --install /usr/bin/fd fd /usr/bin/fdfind 50
|
|
31
34
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
services:
|
|
2
|
+
dev:
|
|
3
|
+
image: paddle
|
|
4
|
+
build:
|
|
5
|
+
dockerfile: docker/Dockerfile.cuda
|
|
6
|
+
args:
|
|
7
|
+
CUDA_VER: "12.9.1"
|
|
8
|
+
gpus: all
|
|
9
|
+
volumes:
|
|
10
|
+
- /home/${USER}/Model:/Model
|
|
11
|
+
- dart_nfs:/data
|
|
12
|
+
|
|
13
|
+
volumes:
|
|
14
|
+
dart_nfs:
|
|
15
|
+
driver: local
|
|
16
|
+
driver_opts:
|
|
17
|
+
type: "nfs"
|
|
18
|
+
o: "addr=coe-chengcli.turbo.storage.umich.edu,nfsvers=3,rw"
|
|
19
|
+
device: ":/coe-chengcli"
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "paddle"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.4"
|
|
8
8
|
description = "Python Atmospheric Dynamics: Discovery and Learning about Exoplanets. An open-source, user-friendly python frontend of canoe"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
paddle-1.2.4/run.sh
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -ex
|
|
3
|
+
|
|
4
|
+
echo "Working Directory = $(pwd)"
|
|
5
|
+
echo "ID=$(id)"
|
|
6
|
+
|
|
7
|
+
source /opt/venv/bin/activate
|
|
8
|
+
#sleep 600
|
|
9
|
+
|
|
10
|
+
MASTER_PORT=29501 # \
|
|
11
|
+
MASTER_ADDR=$1 # \
|
|
12
|
+
NODE_RANK=$2 # \
|
|
13
|
+
PROC_PER_NODE=$3 # \
|
|
14
|
+
NODES=$4 # \
|
|
15
|
+
#WORLD_SIZE=$4 # \
|
|
16
|
+
#CUDA_VISIBLE_DEVICES="0,1" \
|
|
17
|
+
#python /work/straka.py
|
|
18
|
+
|
|
19
|
+
torchrun \
|
|
20
|
+
--nnodes=$NODES \
|
|
21
|
+
--nproc_per_node=$PROC_PER_NODE \
|
|
22
|
+
--node_rank=$NODE_RANK \
|
|
23
|
+
--master_addr=$MASTER_ADDR \
|
|
24
|
+
--master_port=$MASTER_PORT \
|
|
25
|
+
/work/straka.py > a.log 2>&1
|
|
26
|
+
|
|
27
|
+
echo "DONE"
|
|
28
|
+
#sleep 10
|
paddle-1.2.3/Makefile
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
ENV_FILE := .env
|
|
2
|
-
UID := $$(id -u)
|
|
3
|
-
GID := $$(id -g)
|
|
4
|
-
GITCONFIG := $${HOME}/.gitconfig
|
|
5
|
-
GITCREDENTIALS := $${HOME}/.git-credentials
|
|
6
|
-
|
|
7
|
-
.PHONY: help env up down ps start build
|
|
8
|
-
|
|
9
|
-
# Show help for each target
|
|
10
|
-
help: ## Show this help message
|
|
11
|
-
@echo "Available commands:"
|
|
12
|
-
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
|
13
|
-
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
|
|
14
|
-
|
|
15
|
-
env: ## Generate the .env file with git configs first, then user info
|
|
16
|
-
@# Check if either variable is missing
|
|
17
|
-
@if ! grep -q '^GITCONFIG=' $(ENV_FILE) 2>/dev/null || \
|
|
18
|
-
! grep -q '^GITCREDENTIALS=' $(ENV_FILE) 2>/dev/null; then \
|
|
19
|
-
if [ -f "$${HOME}/.gitconfig" ]; then \
|
|
20
|
-
echo "GITCONFIG=$${HOME}/.gitconfig" > $(ENV_FILE); \
|
|
21
|
-
else \
|
|
22
|
-
touch "$${HOME}/.gitconfig"; \
|
|
23
|
-
echo "GITCONFIG=$${HOME}/.gitconfig" > $(ENV_FILE); \
|
|
24
|
-
fi; \
|
|
25
|
-
if [ -f "$${HOME}/.git-credentials" ]; then \
|
|
26
|
-
echo "GITCREDENTIALS=$${HOME}/.git-credentials" >> $(ENV_FILE); \
|
|
27
|
-
else \
|
|
28
|
-
touch "$${HOME}/.git-credentials"; \
|
|
29
|
-
echo "[credential]" >> "$${HOME}/.gitconfig"; \
|
|
30
|
-
echo " helper = store" >> "$${HOME}/.gitconfig"; \
|
|
31
|
-
echo "GITCREDENTIALS=$${HOME}/.git-credentials" >> $(ENV_FILE); \
|
|
32
|
-
fi; \
|
|
33
|
-
echo "USER=$$(id -un)" >> $(ENV_FILE); \
|
|
34
|
-
echo "USER_UID=$$(id -u)" >> $(ENV_FILE); \
|
|
35
|
-
echo "USER_GID=$$(id -g)" >> $(ENV_FILE); \
|
|
36
|
-
echo "Created $(ENV_FILE):"; cat $(ENV_FILE); \
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
up: env ## Start docker containers in the background
|
|
40
|
-
@docker compose up -d
|
|
41
|
-
@docker compose exec dev bash -c '\
|
|
42
|
-
USER_HOME=$$(eval echo ~$$USERNAME); \
|
|
43
|
-
if [ -f /etc/git-credentials ] && [ ! -f $$USER_HOME/.git-credentials ]; then \
|
|
44
|
-
cp /etc/git-credentials $$USER_HOME/.git-credentials; \
|
|
45
|
-
chown $${USER_UID}:$${USER_GID} $$USER_HOME/.git-credentials; \
|
|
46
|
-
git config --global credential.helper store; \
|
|
47
|
-
fi \
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
down: env ## Stop and remove docker containers
|
|
51
|
-
@docker compose down
|
|
52
|
-
|
|
53
|
-
ps: env ## Show container status
|
|
54
|
-
@docker compose ps
|
|
55
|
-
|
|
56
|
-
start: env ## Open a bash shell inside the 'dev' container as the host user, exit without error
|
|
57
|
-
@docker compose exec --user $(UID):$(GID) dev \
|
|
58
|
-
bash -c 'git config --global --add safe.directory /paddle; exec bash'
|
|
59
|
-
|
|
60
|
-
build: env ## Build (or rebuild) the 'dev' container and start it
|
|
61
|
-
@docker compose up -d --build dev
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|