Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebooks - set up paths to use environment variables better #7

Open
jyoung3131 opened this issue Sep 20, 2022 · 0 comments
Open

Notebooks - set up paths to use environment variables better #7

jyoung3131 opened this issue Sep 20, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jyoung3131
Copy link
Contributor

jyoung3131 commented Sep 20, 2022

Right now we explicitly set the path to the tools in the notebook. It would be great if we could read this from a file or pull it from the environment variables. Unfortunately Slurm-launched jobs often won't have the correct "LUCATA_BASE" set as an environment variable.

import os

#Set the path to the latest toolset 
LUCATA_BASE="/tools/emu/pathfinder-sw/22.09-beta" 

#Get the path to where all code samples are
os.environ["USER_NOTEBOOK_CODE"]=os.path.dirname(os.getcwd())
os.environ["PATH"]=os.pathsep.join([os.path.join(LUCATA_BASE,"bin"),os.environ["PATH"]])
os.environ["FLAGS"]="-I"+LUCATA_BASE+"/include/"+" -L"+LUCATA_BASE+"/lib -lmemoryweb"

Ideally we'd like to read LUCATA_BASE from a file in the repo so we can more easily update for future toolsets.

@jyoung3131 jyoung3131 added the enhancement New feature or request label Sep 20, 2022
@jyoung3131 jyoung3131 self-assigned this Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant