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
# pull the official image | |
FROM tensorflow/tensorflow:latest-gpu-jupyter | |
# make a dir inside the container to copy files | |
WORKDIR /tfjupyter | |
# install additional packages | |
COPY requirements.txt . | |
COPY entrypoint.sh . | |
RUN ["chmod", "+x", "entrypoint.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
version: "3" | |
services: | |
tensorflow: | |
container_name: TfJupyter | |
build: | |
context: . | |
dockerfile: Dockerfile | |
volumes: | |
- .:/tf |
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
def set_conf(): | |
conf = SparkConf().setAppName("App") | |
conf = (conf.setMaster('local[*]') | |
.set('spark.executor.memory', '4G') | |
.set('spark.driver.memory', '16G') | |
.set('spark.driver.maxResultSize', '8G')) | |
return conf |
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
import os | |
#download SRA tool kit | |
def setup_sra_tool(url): | |
!wget $url | |
!gunzip sratoolkit.2.9.6-1-ubuntu64.tar.gz | |
!tar -xf sratoolkit.2.9.6-1-ubuntu64.tar | |
#download SRA file and extract fastq |
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
from subprocess import STDOUT, check_call, check_output | |
def install_java_scala(): | |
try: | |
java_ver = check_output(['java', '-version'], stderr=STDOUT) | |
except: | |
java_ver = b'' | |
try: | |
scala_ver = check_output(['scala', '-version'], stderr=STDOUT) | |
except: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def startup(): | |
global matrix | |
matrix = load_large_matrix() | |
# then you would | |
from yourapp import matrix |