hpc-toolset-tutorial icon indicating copy to clipboard operation
hpc-toolset-tutorial copied to clipboard

/var/git/bc_example_jupyter doesn't contain code

Open iqlinuxadmin opened this issue 7 months ago • 11 comments

It says here: https://github.com/ubccr/hpc-toolset-tutorial/blob/master/ondemand/README.md#create-the-jupyter-application to use /var/git/bc_example_jupyter as the Git Remote, but the only thing in that directory is the files that normally live in .git. The actual bc_example_jupyter code is not there. If I use https://github.com/OSC/bc_example_jupyter as the Git Remote, everything works fine. I'm guessing you prefer to use a local directory to avoid some downloading during conferences, but it's not working as is. Here's what's there:

[hpcadmin@ondemand bc_example_jupyter]$ pwd
/var/git/bc_example_jupyter
[hpcadmin@ondemand bc_example_jupyter]$ ls -A
branches  config  description  HEAD  hooks  info  objects  packed-refs  refs

I see there's also an ood_example_ps directory in /var/git. I haven't gotten to the point in the tutorial where I'd be using that, but it looks like it too only has the contents of .git without any actual code.

iqlinuxadmin avatar Jun 17 '25 18:06 iqlinuxadmin

It appears to be a bare clone https://github.com/ubccr/hpc-toolset-tutorial/blob/761e76bce5a5c36e6305f4258a3ddb842d629587/ondemand/install.sh#L87

But more importantly - does that step not work? I mean when you "create the app" does it not create the app correctly?

johrstrom avatar Jun 17 '25 19:06 johrstrom

Hm. I wonder if something went wrong when I ran install.sh. I'll go back and start the whole tutorial from scratch and see what happens.

iqlinuxadmin avatar Jun 17 '25 19:06 iqlinuxadmin

Ok. I didn't run install.sh. I may have missed it, but I don't see it referenced in the directions...

iqlinuxadmin avatar Jun 17 '25 19:06 iqlinuxadmin

What I am doing is starting on this page: https://github.com/ubccr/hpc-toolset-tutorial/blob/master/README.md and following the links to the next pages, running everything I see. For coldfront, I did the "Start From Scratch" version of the instructions, though I wouldn't expect that to affect OOD.

I'm doing this to self train, but I figured I might as well clarify or update anything I found as I went through it.

iqlinuxadmin avatar Jun 17 '25 19:06 iqlinuxadmin

Ok. I didn't run install.sh. I may have missed it, but I don't see it referenced in the directions...

When the containers are being built, they run this shell script as a part of the build process.

Are you not working off of the containers provided in this repo?

johrstrom avatar Jun 17 '25 20:06 johrstrom

I am indeed working off of the containers provided in this repo. It turns out that git clone --bare does exactly the opposite of what you want it to: https://graphite.dev/guides/git-clone-bare-mirror

iqlinuxadmin avatar Jun 17 '25 20:06 iqlinuxadmin

This would work:

git clone --depth 1 https://github.com/OSC/bc_example_jupyter.git /var/git/bc_example_jupyter && rm -rf /var/git/bc_example_jupyter/.git

iqlinuxadmin avatar Jun 17 '25 20:06 iqlinuxadmin

Okay, I made a PR for this.

iqlinuxadmin avatar Jun 17 '25 20:06 iqlinuxadmin

Okay, I made a PR for this.

I'll have to boot these containers up to see what happens, but I'm pretty sure when you make the application from this path it does in fact copy all the files.

A glance at the code indicates it does a lot of git operations to make this happen.

https://github.com/OSC/ondemand/blob/01a1fb9dae08df8b54790bca280ec45f871a83ee/apps/dashboard/app/models/product.rb

I guess what I'm asking is - what's the end result when you make an app from this location /var? And is that end result somehow erroneous? From what I recall, it's not erroneous. That is, the end result is that you end up with the actual files that you need in your HOME.

johrstrom avatar Jun 18 '25 13:06 johrstrom

The end result is that it doesn't create the app. I'll try again and give you more details. It seems hard to believe that it doesn't work to me too, since I know this tutorial has been used many times. It makes me think it's something I'm {,not} doing, but I don't know what.

iqlinuxadmin avatar Jun 18 '25 13:06 iqlinuxadmin

Okay. I started over from scratch. It almost worked. It gave me a permissions error. Once I did `chown hpcadmin:hpcadmin /var/git/bc_example_jupyter' the application was created successfully. I'm going to delete and recreate absolutely everything and see what happens, but not today! If the chown isn't necessary, I'll close this.

iqlinuxadmin avatar Jun 18 '25 14:06 iqlinuxadmin