This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # set PATH & LD_LIBRARY_PATH env variable for ssh login session | |
# # Env variable cannot be passed to container - General Discussions - Docker Forums | |
# # https://forums.docker.com/t/env-variable-cannot-be-passed-to-container/5298/6 | |
# RUN echo 'export PATH=/usr/local/nvidia/bin:$PATH' >> /etc/profile.d/nvidia.sh && \ | |
# echo 'export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:$LD_LIBRARY_PATH' >> /etc/profile.d/nvidia.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/pam.d/common-session | |
... | |
session optional pam_systemd.so | |
... | |
# /etc/ssh/sshd_config | |
... | |
UseDNS no | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /tmp | |
wget https://repo.continuum.io/archive/Anaconda3-2019.03-Linux-x86_64.sh | |
sh Anaconda3-2019.03-Linux-x86_64.sh | |
sudo groupadd anaconda | |
sudo groupmod -g 3000 anaconda | |
sudo chgrp -R anaconda /opt/anaconda3 | |
sudo chmod 770 -R /opt/anaconda3 | |
sudo adduser username anaconda | |
source /opt/anaconda3/bin/activate | |
conda create -n username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"default-runtime": "nvidia", | |
"runtimes": { | |
"nvidia": { | |
"path": "/usr/bin/nvidia-container-runtime", | |
"runtimeArgs": [] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install -y resolvconf | |
2/ Edit /etc/resolvconf/resolv.conf.d/head and add the following: | |
# Make edits to /etc/resolvconf/resolv.conf.d/head. | |
nameserver 8.8.4.4 | |
nameserver 8.8.8.8 | |
sudo /etc/init.d/resolvconf restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autossh -M 0 -o "ServerAliveInterval 10" -o "ServerAliveCountMax 2" -L 9999:localhost:9999 user@server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano /etc/default/grub | |
GRUB_CMDLINE_LINUX_DEAULT="acpi=of nouveau.modeset=0" | |
sudo update-grub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://download.openvz.org/openvz.repo -O /etc/yum.repos.d/openvz.repo | |
yum install vzkernel vzctl vzquota | |
vim /etc/sysctl.conf | |
# On Hardware Node we generally need | |
# packet forwarding enabled and proxy arp disabled | |
net.ipv4.ip_forward = 1 | |
net.ipv6.conf.default.forwarding = 1 | |
net.ipv6.conf.all.forwarding = 1 | |
net.ipv4.conf.default.proxy_arp = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
- name: Update WordPress config file | |
lineinfile: | |
dest=/var/www/wordpress/wp-config.php | |
regexp="{{ item.regexp }}" | |
line="{{ item.line }}" | |
with_items: | |
- {'regexp': "define\\( 'DB_NAME', '(.*?)' \\);", 'line': "define('DB_NAME', '{{ wp_mysql_db }}');"} | |
- {'regexp': "define\\( 'DB_USER', '(.*?)' \\);", 'line': "define('DB_USER', '{{ wp_mysql_user }}');"} | |
- {'regexp': "define\\( 'DB_PASSWORD', '(.*?)' \\);", 'line': "define('DB_PASSWORD', '{{ wp_mysql_password }}');"} |