-
Notifications
You must be signed in to change notification settings - Fork 101
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
Set LD_LIBRARY_PATH
on mamba activate
#1496
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,4 @@ | ||||
#!/bin/sh | ||||
|
||||
# Help CUDA find GPUs! | ||||
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure this will work? I thought the cuda binaries were stored in the Like, one blocker for upgrading to newer tensorflow was that we couldn't dynamically set this since users would have different env names. If it's really in If it doesn't work, then it might be ok to just include the extra line that people have to run in the install docs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The (nb4) talmolab@talmolab-01-ubuntu:~/sleap-estimates-animal-poses/pull-requests/sleap$ echo $CONDA_PREFIX
/home/talmolab/micromamba/envs/nb4 !!! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think that might be the point of using Line 23 in 21339e9
😨 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,4 @@ dependencies: | |
|
||
- pip: | ||
- "--editable=.[conda_dev]" | ||
|
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 new block of code is responsible for copying the activation scripts to a specific directory. This will allow them to be run when the environment is activated. However, there's no error handling in case the copy operation fails. It would be beneficial to add some error checking here to ensure that the script has been copied successfully.
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 build just fails and gives us an error message if these lines end in failure.
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.
@roomrys While it's true that the build will fail and provide an error message if these lines end in failure, adding explicit error handling can still be beneficial. It allows you to control the error message that is displayed, making it more informative and specific to the operation that failed. This can help with troubleshooting and understanding exactly what went wrong.
For example, without explicit error handling, you might get a generic "No such file or directory" error. With explicit error handling, you can provide a message like "Failed to copy ${PKG_NAME}_${CHANGE}.sh", which immediately tells you that the script failed to copy.
Additionally, explicit error handling allows you to control the exit code of the script. This can be useful if other scripts or systems are relying on specific exit codes for certain types of failures.
Here's how you could modify the code to include explicit error handling:
This way, if the copy operation fails, the script will print a specific error message and then exit with a status of 1.