File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
src/ibm_ray_config/modules/gen2/ray Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,12 @@ rsync_filter: []
104
104
initialization_commands : []
105
105
106
106
setup_commands :
107
- # Note: if you're developing Ray, you probably want to create an AMI that
108
- # has your Ray repo pre-cloned. Then, you can replace the pip installs
109
- # below with a git checkout <your_sha> (and possibly a recompile).
110
- # - echo 'export PATH="$HOME/anaconda3/envs/tensorflow_p36/bin:$PATH"' >> ~/.bashrc
111
- # Install ray if not present
112
- - sleep 30 && apt update && apt install python3.8 -y && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.8 get-pip.py
113
- - test -d ~/.venv || (pip install virtualenv && virtualenv -p /usr/bin/python3.8 ~/.venv && echo source ~/.venv/bin/activate >> ~/.bashrc && echo "source ~/.venv/bin/activate" | cat - ~/.bashrc | tee ~/.bashrc)
107
+ # Important to note: Ubuntu22 and Ubuntu20 comes with different python versions preinstalled,
108
+ # albeit pointed by the same symlink: /usr/bin/python3.
109
+ # Also, if running on Ubuntu22 config the needrestart to restart services automatically instead of interactive mode
110
+ - find /etc/needrestart/needrestart.conf >/dev/null 2>1 && sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
111
+ - apt update && apt install python3-pip -y
112
+ - test -d ~/.venv || (pip install virtualenv && virtualenv -p /usr/bin/python3 ~/.venv && echo source ~/.venv/bin/activate >> ~/.bashrc && echo "source ~/.venv/bin/activate" | cat - ~/.bashrc | tee ~/.bashrc)
114
113
- source ~/.venv/bin/activate
115
114
- pip install ibm-vpc ibm_platform_services ibm_cloud_sdk_core
116
115
- apt install libgl1-mesa-glx -y && pip install pandas tabulate gym tensorboardX dm_tree opencv-python transformers torch
You can’t perform that action at this time.
0 commit comments