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
I would like to automate building an AWS AMI using Packer starting with my publicly available AMI ami-3bc24748 (Ireland).
Manual approach: after instantiating the above AMI I execute three commands:
cd deepdetect/build
cmake .. -DUSE_CUDNN=ON
make
This results in flawless build of the software tool:
Using Packer for doing the same: do the same starting from the same AMI by invoking: packer build -var 'aws_access_key=...' - var 'aws_secret_key=...' dede.json (see https://gist.github.com/revilokeb/d9d90998edd7c1dc6ac7)
This results in the following linking error in the very last step (output below red line is different from manual built):
When using Packer, the linker seems to be unable to find CUDA libraries such as libcudart.so.7.5 which are indeed in /usr/local/cuda/lib64/ (I have checked), also LD_LIBRARY_PATH (set to /usr/local/cuda/lib64/) seems to get ignored.
Any hints what can be done to automatically build the tool are appreciated!
The text was updated successfully, but these errors were encountered:
Ok, the issue can be solved by adding one line to my gist, i.e. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64.
Is this by design that LD_LIBRARY_PATH needs to be set for building when using Packer (although it is correcty set in .bashrc)? Sorry for my limited understanding of Packer...
Thanks for opening an issue. Please take a look at the documentation for the remote shell provisioner which explains how environment variables are passed to the remote command.
Packer does not include .bashrc or .bash_profile on the remote side because use of these files varies between different operating systems and the way the user logs into the machine, so you will need to create the environment you expect in your packer configuration.
I would like to automate building an AWS AMI using Packer starting with my publicly available AMI ami-3bc24748 (Ireland).
Manual approach: after instantiating the above AMI I execute three commands:
This results in flawless build of the software tool:
![160318-manual_deepdetect_build](https://cloud.githubusercontent.com/assets/10588773/13875801/522da164-ed00-11e5-9ad2-60896ed82926.png)
Using Packer for doing the same: do the same starting from the same AMI by invoking: packer build -var 'aws_access_key=...' - var 'aws_secret_key=...' dede.json (see https://gist.github.com/revilokeb/d9d90998edd7c1dc6ac7)
This results in the following linking error in the very last step (output below red line is different from manual built):
![160318-packer_deepdetect_build](https://cloud.githubusercontent.com/assets/10588773/13876332/966f77d2-ed03-11e5-9def-614debbd76ad.png)
When using Packer, the linker seems to be unable to find CUDA libraries such as libcudart.so.7.5 which are indeed in /usr/local/cuda/lib64/ (I have checked), also LD_LIBRARY_PATH (set to /usr/local/cuda/lib64/) seems to get ignored.
Any hints what can be done to automatically build the tool are appreciated!
The text was updated successfully, but these errors were encountered: