-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bash script to simplify/automate user setup on hpc #37
Conversation
Ran another test, this time including the conda environment step. Overall things seem to work, albeit with some errors and warnings in the conda process.
More details below. |
else | ||
echo "Creating conda environment and installing dependencies" | ||
cd /scratch/gpfs/rkoeser/htr2hpc_setup/kraken | ||
conda env create -f environment_cuda.yml -n $conda_env_name |
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 do get one error here:
['/home/croughan/.conda/envs/htr2hpc_TEST/bin/python', '-m', 'pip', 'install', '-U', '-r', '/tmp/condaenv.z0lgf55i.requirements.txt', '--exists-action=b']
Pip subprocess output:
Processing /scratch/gpfs/croughan/.conda/envs/htr2hpc_TEST
Pip subprocess error:
ERROR: file:///. (from -r /tmp/condaenv.z0lgf55i.requirements.txt (line 2)) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
failed
CondaEnvException: Pip failed
But outside the failure to handle that last line of environment_cuda.yml
, line 33 of the script seems to work.
conda activate $conda_env_name | ||
pip install -q torchvision torch==2.1 torchaudio==2.1 | ||
pip install -q git+https://github.com/Princeton-CDH/htr2hpc.git@develop#egg=htr2hpc |
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 get a CondaError: Run 'conda init' before 'conda activate'
warning. This does not cause issues with activating the environment afterwards, but during this script's runtime I think it is preventing these pip installations from working -- I still have the old versions of these libraries, not the version numbers to be installed here.
Otherwise, I'll want to remember to mention to people that this script will take a few minutes to run (it took 5 mins in this test) and not to exit prematurely. We could have an |
@cmroughan thanks for your careful testing. Do we need to make some adjustments for the errors you found? Echoing a reminder that it will take a little while to install all the dependencies seems like an easy and reasonable thing to add. |
Further testing revealed that the second issue ( So I think no need to make any adjustments for the above errors. I think we can just toss in a note about installation time and leave it at that! |
@cmroughan so are we ready to merge? or do you want to suggest a message to output first? |
Co-authored-by: cmroughan <[email protected]>
User setup for #15
Based on the instructions we were drafting in the google doc.
I've copied this script to della. you should be able to run it by sshing to della and then entering:
If you want to test using it to create a new conda env (since you already have an htr2hpc env), you could copy it into your space and edit the name of the conda env it's going to create by modifying the
conda_env_name
variable on line 26.