You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
@agahkarakuzu I think the directory changes you made (possibly in this commit) to the data made it such that the Colab build (and I'm going to assume, possibly also the repo2docker build) is breaking:
I thought I had setup the repo2data folder format to match the neurolibre requirement for directory structure, do you recall why you changed my old way?
The reason will be displayed to describe this comment to others. Learn more.
os.getenv() method in Python OS env returns the value of the os environment variable key if it exists otherwise returns the default value.
Ouff, so the default is just /root in Colab because $HOME isn't defined in their container/instance. We'll need to go another way about it then, this is an important quirck to know for both of us I think @agahkarakuzu haha
The reason will be displayed to describe this comment to others. Learn more.
The more I dig, the more this seems to be maybe a very Colab-specific behaviour (which is quite confusing and annoying):
So the best way is likely to just set the home path to /content when you're in Colab, as this is always going to be it by default. I'll continue to look a short amount of time more but so far all the cross-platform ways to get the home path is incorrectly showing /root instead of /content for Colab
088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agahkarakuzu I think the directory changes you made (possibly in this commit) to the data made it such that the Colab build (and I'm going to assume, possibly also the repo2docker build) is breaking:
I thought I had setup the repo2data folder format to match the neurolibre requirement for directory structure, do you recall why you changed my old way?
088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eg lines like
path_data = os.path.join(os.getenv('HOME'),"data/rf-shimming-7t/ds004906")
are incorrect in Colab, as
So we nee to be careful which or how paths are set for NeuroLibre Binder vs Colab vs Local Binder
088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a curious quirk:
088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouff, so the default is just
/root
in Colab because$HOME
isn't defined in their container/instance. We'll need to go another way about it then, this is an important quirck to know for both of us I think @agahkarakuzu haha088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more I dig, the more this seems to be maybe a very Colab-specific behaviour (which is quite confusing and annoying):
So the best way is likely to just set the home path to
/content
when you're in Colab, as this is always going to be it by default. I'll continue to look a short amount of time more but so far all the cross-platform ways to get the home path is incorrectly showing /root instead of /content for Colab088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess some folks on Raspberry Pi's get the same issue, seems like python is switching between using root vs the user when looking for the home folder, https://raspberrypi.stackexchange.com/questions/34216/using-os-path-expanduser-i-am-getting-root-instead-of-home-pi
This could possibly be an issue for Docker containers as well depending on the platform/if users modded it to run as root/user (not sure which one)?
088dccd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing a few options, I think I'll have to go the following route:
Testing it on colab; will also need to test it on repo2docker locally