Skip to content

Commit 7bcca11

Browse files
authored
Merge pull request #14 from hdpriest-ui/develop
Develop
2 parents bee1512 + a1070c7 commit 7bcca11

3 files changed

Lines changed: 33 additions & 7 deletions

File tree

Deploy.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,24 @@
22

33
## get the most recent changes moved to campus cluster
44

5+
#### ONCE
6+
Move or re-create the central repo located at `/sw/icrn/jupyter/icrn_ncsa_resources/Kernels/` to
7+
`/sw/icrn/dev/kernels/`
8+
9+
copy tools to path loc (dev paths):
10+
```sh
11+
cp ./icrn_manager /sw/icrn/dev/bin/
12+
cp ./update_r_libs.sh /sw/icrn/dev/bin/
13+
chmod +x /sw/icrn/dev/bin/icrn_manager
14+
chmod +x /sw/icrn/dev/bin/update_r_libs.sh
15+
```
16+
17+
Change Kernel Central Repo Path in icrn_manager to reflect environment
18+
-- what is the signal in icrn that we are in prod/dev? --
519

6-
## Changes needed to ICRN containers in dev
720

21+
## Changes needed to ICRN containers in dev
22+
JQ installed on container
823

924

1025
## running the kernel index process
@@ -18,6 +33,15 @@ Tested on campus cluster via apptainer, this indexes the central repository of k
1833
(base) [hdpriest@cc-login2 icrn_manager]$ apptainer pull docker://hdpriest0uiuc/icrn-kernel-indexer
1934

2035
(base) [hdpriest@cc-login2 icrn_manager]$ apptainer run --bind /sw/icrn/jupyter/icrn_ncsa_resources/Kernels:/sw/icrn/jupyter/icrn_ncsa_resources/Kernels icrn-kernel-indexer_latest.sif
36+
```
37+
38+
For dev and prod environments, the kernel index job needs to be run using a custom kernel root env variable (see directly below)
39+
40+
this will obviously be different based on the container runtime
41+
```sh
42+
#### DEV
43+
(base) [hdpriest@cc-login2 icrn_manager]$
44+
apptainer run --env "KERNEL_ROOT=/sw/icrn/dev/kernels" --bind /sw/icrn/dev/kernels:/sw/icrn/dev/kernels icrn-kernel-indexer_latest.sif
2145
## ... output
2246
Collated manifest written to: /sw/icrn/jupyter/icrn_ncsa_resources/Kernels/collated_manifests.json
2347
## ... output
@@ -36,8 +60,7 @@ docker build -t icrn-web -f web/Dockerfile web/
3660
Assuming you have a built container (obtained from dockerhub, or built locally), the container expects bind mounts to the location where the manifests/index are kept, and so is flexible for its back-end storage as long as it has access to the same disk mount as the index job:
3761
```bash
3862
docker run -d -p 8080:80 --name icrn-web \
39-
-v /sw/icrn/jupyter/icrn_ncsa_resources/Kernels/collated_manifests.json:/app/data/collated_manifests.json \
40-
-v /sw/icrn/jupyter/icrn_ncsa_resources/Kernels/package_index.json:/app/data/package_index.json \
63+
-v /sw/icrn/dev/kernels:/app/data:ro \
4164
icrn-web
4265
```
4366

icrn_manager

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ fi
1313

1414
icrn_base=".icrn"
1515
icrn_kernels="icrn_kernels"
16-
central_catalog_default="/sw/icrn/jupyter/icrn_ncsa_resources/Kernels"
16+
APP_FOLDER=$(dirname $0)
17+
KERNEL_FOLDER=${KERNEL_FOLDER:-${APP_FOLDER}/../kernels}
18+
if [ ! -d ${KERNEL_FOLDER} ]; then echo "Could not determine location of kernel respository - contact administrator"; exit -1 ; fi
19+
central_catalog_default=${KERNEL_FOLDER}
1720

1821
ICRN_USER_BASE=${ICRN_USER_BASE:-${HOME}/${icrn_base}}
1922
ICRN_MANAGER_CONFIG=${ICRN_MANAGER_CONFIG:-${ICRN_USER_BASE}/manager_config.json}

kernel-indexer/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ docker build -t icrn-kernel-indexer:latest .
3030

3131
```bash
3232
docker run --rm \
33-
-v /sw/icrn/jupyter/icrn_ncsa_resources/Kernels:/sw/icrn/jupyter/icrn_ncsa_resources/Kernels \
33+
-v /sw/icrn/dev/kernels:/sw/icrn/dev/kernels \
3434
icrn-kernel-indexer:latest
3535
```
3636

3737
### With Custom Configuration
3838

3939
```bash
4040
docker run --rm \
41-
-v /sw/icrn/jupyter/icrn_ncsa_resources/Kernels:/sw/icrn/jupyter/icrn_ncsa_resources/Kernels \
42-
-e KERNEL_ROOT=/sw/icrn/jupyter/icrn_ncsa_resources/Kernels \
41+
-v /sw/icrn/dev/kernels:/sw/icrn/dev/kernels \
42+
-e KERNEL_ROOT=/sw/icrn/dev/kernels \
4343
-e LANGUAGE_FILTER=Python \
4444
-e LOG_LEVEL=DEBUG \
4545
icrn-kernel-indexer:latest

0 commit comments

Comments
 (0)