6 changed files with 76 additions and 1 deletions
@ -1,5 +1,14 @@
@@ -1,5 +1,14 @@
|
||||
#!/bin/bash |
||||
|
||||
if [ "$(id -u)" != "0" ]; then |
||||
echo "" |
||||
echo "" |
||||
echo "This script should be run as root." |
||||
echo "" |
||||
echo "" |
||||
exit 1; |
||||
fi |
||||
|
||||
bash <( curl https://get.docker.com/ ) |
||||
|
||||
usermod -aG docker ubuntu |
||||
|
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash |
||||
|
||||
if [ "$(id -u)" != "0" ]; then |
||||
echo "" |
||||
echo "" |
||||
echo "This script should be run as root." |
||||
echo "" |
||||
echo "" |
||||
exit 1; |
||||
fi |
||||
|
||||
curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
||||
chmod +x /usr/local/bin/docker-compose |
||||
|
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3 |
||||
import os, sys |
||||
import getpass |
||||
import tempfile |
||||
import subprocess |
||||
|
||||
""" |
||||
Install Virtualenv |
||||
""" |
||||
|
||||
def install_venv(): |
||||
user = getpass.getuser() |
||||
|
||||
if(user=="root"): |
||||
raise Exception("You are root - you should run this script as a normal user.") |
||||
else: |
||||
|
||||
print("Installing snakemake...") |
||||
|
||||
pyenvbin = os.environ['HOME'] |
||||
condabin = pyenvbin+"/.pyenv/shims/conda" |
||||
pipbin = pyenvbin+"/.pyenv/shims/pip" |
||||
|
||||
print(" - Installing virtualenv") |
||||
rc = subprocess.call([pipbin,"install","virtualenv"]) |
||||
if(rc != 0): |
||||
raise Exception() |
||||
|
||||
|
||||
print(" ~~*~~ ~~*~~ ~~*~~ SUCCESS! ~~*~~ ~~*~~ ~~*~~\n") |
||||
print(" Snakemake is now installed.") |
||||
print(" Test that snakemake is working using the following one-liner:\n") |
||||
print(" virtualenv vp && rm -fr vp") |
||||
print() |
||||
|
||||
|
||||
if __name__=="__main__": |
||||
install_venv() |
||||
|
Loading…
Reference in new issue