Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #15 from SD2E/from-ubuntu
Browse files Browse the repository at this point in the history
Fixes #14 and #13
  • Loading branch information
zyndagj authored Apr 21, 2018
2 parents 340e9d0 + aa0deab commit 78cec3a
Show file tree
Hide file tree
Showing 36 changed files with 4,131 additions and 261 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project are to be documented in this file.

## Version 0.3.3

- Added hub https://github.com/github/hub
- Create persistent environments
- `conda create -y -p $LOCAL_ENVS/tabsAreGreat python=2.7 ipykernel 'scipy==0.16.0'`
- Discover persistent environments
- `conda env list`
- Create a new kernel
- `$LOCAL_ENVS/tabsAreGreat/bin/python -m ipykernel install --prefix $JUPYTER_WORK --name tabsAreGreat --display-name "tabs are great"`
- Refresh main page
- Added ML modules
- Tensorflow 1.6
- Theano
- Keras
- Optimized image size by starting from ubuntu base

## Version 0.3.1

- Added `PYTHONUSERBASE` variable, which points at `tacc-work/jupyter_packages`, and allows for persistent local pip installs
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ git checkout -b myFeature development
Please add any external example or configuration files in a descriptive folder in

```
images/custom/
images/sd2e/
```

and add a new section at the end of the main `Dockerfile` in

```
images/custom/Dockerfile
images/sd2e/Dockerfile
```

for your code immediately **before** the permissiosn section.
Expand Down
146 changes: 73 additions & 73 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.ONESHELL:
.PHONY: build test docker help stage release clean
ifndef VERBOSE
.SILENT: build test docker help stage release clean
Expand All @@ -9,98 +8,99 @@ all: help

.PHONY: help
help:
echo "\nUsage: make [action] [target]\n"
echo "Actions:"
echo " - build - build docker images locally"
echo " - test - test images locally"
echo " - stage - push images to staging environment"
echo " - release - push images to production environment\n"
echo "Targets:"
echo " - base - Recipe in images/base"
echo " - sd2e - Recipe in images/custom which is where all community software should belong"

echo "\nUsage: make [action] [target]\n" && \
echo "Actions:" && \
echo " - build - build docker images locally" && \
echo " - test - test images locally" && \
echo " - stage - push images to staging environment" && \
echo " - release - push images to production environment\n" && \
echo "Targets:" && \
echo " - base - Recipe in images/base" && \
echo " - sd2e - Recipe in images/sd2e which is where all community software should belong" && \
echo " - singularity - Image for running on TACC HPC\n"

# Make sure image targets are not used as make targets
%:
@:

docker:
docker info > /dev/null 2> /dev/null
if [ ! $$? -eq 0 ]; then
echo "\n[ERROR] Could not communicate with docker daemon. You may need to run with sudo.\n"
exit 1
docker info 1> /dev/null 2> /dev/null && \
if [ ! $$? -eq 0 ]; then \
echo "\n[ERROR] Could not communicate with docker daemon. You may need to run with sudo.\n"; \
exit 1; \
fi

build: docker
TARGET=$(filter-out $@,$(MAKECMDGOALS))
case $${TARGET} in
base)
build/build_jupyteruser.sh build images/base
;;
sd2e)
build/build_jupyteruser.sh build images/custom
;;
singularity)
build/build_jupyteruser.sh build images/singularity
;;
*)
$(MAKE) help
;;
TARGET=$(filter-out $@,$(MAKECMDGOALS)) && \
case $${TARGET} in \
base) \
build/build_jupyteruser.sh build images/base; \
;; \
sd2e) \
build/build_jupyteruser.sh build images/sd2e; \
;; \
singularity) \
build/build_jupyteruser.sh build images/singularity; \
;; \
*) \
$(MAKE) help; \
;; \
esac

test: docker
TARGET=$(filter-out $@,$(MAKECMDGOALS))
case $$TARGET in
base)
build/build_jupyteruser.sh test images/base
;;
sd2e)
build/build_jupyteruser.sh test images/custom
;;
singularity)
build/build_jupyteruser.sh test images/singularity
;;
*)
$(MAKE) help
;;
TARGET=$(filter-out $@,$(MAKECMDGOALS)) && \
case $$TARGET in \
base) \
build/build_jupyteruser.sh test images/base; \
;; \
sd2e) \
build/build_jupyteruser.sh test images/sd2e; \
;; \
singularity) \
build/build_jupyteruser.sh test images/singularity; \
;; \
*) \
$(MAKE) help; \
;; \
esac

stage: docker
TARGET=$(filter-out $@,$(MAKECMDGOALS))
case $$TARGET in
base)
build/build_jupyteruser.sh stage images/base
;;
sd2e)
build/build_jupyteruser.sh stage images/custom
;;
singularity)
build/build_jupyteruser.sh stage images/singularity
;;
*)
$(MAKE) help
;;
TARGET=$(filter-out $@,$(MAKECMDGOALS)) && \
case $$TARGET in \
base) \
build/build_jupyteruser.sh stage images/base; \
;; \
sd2e) \
build/build_jupyteruser.sh stage images/sd2e; \
;; \
singularity) \
build/build_jupyteruser.sh stage images/singularity; \
;; \
*) \
$(MAKE) help; \
;; \
esac

release: docker
TARGET=$(filter-out $@,$(MAKECMDGOALS))
case $$TARGET in
base)
build/build_jupyteruser.sh release images/base
;;
sd2e)
build/build_jupyteruser.sh release images/custom
;;
singularity)
build/build_jupyteruser.sh release images/singularity
;;
*)
$(MAKE) help
;;
TARGET=$(filter-out $@,$(MAKECMDGOALS)) && \
case $$TARGET in \
base) \
build/build_jupyteruser.sh release images/base; \
;; \
sd2e) \
build/build_jupyteruser.sh release images/sd2e; \
;; \
singularity) \
build/build_jupyteruser.sh release images/singularity; \
;; \
*) \
$(MAKE) help; \
;; \
esac

clean: docker
TARGET=$(filter-out $@,$(MAKECMDGOALS))
build/build_jupyteruser.sh clean images/singularity
build/build_jupyteruser.sh clean images/custom
TARGET=$(filter-out $@,$(MAKECMDGOALS)) && \
build/build_jupyteruser.sh clean images/singularity && \
build/build_jupyteruser.sh clean images/sd2e && \
build/build_jupyteruser.sh clean images/base
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Jupyter Notebook \(v5.2.0\)server
* Conda Python 3.4.x and Python 2.7.x environments
* Custom environments and kernels now supported through `Advanced Jupyter.ipynb` notebook
* Pre-installed python packages (highlights)
* pandas
* matplotlib 2.1.2
Expand All @@ -16,6 +17,7 @@
* Plotly, igraph, networkx, graphviz for graphs and plots
* MIT's [Open Probabilistic Programming Stack](http://probcomp.org/)
* [Common Lisp kernel and stack](http://www.sbcl.org/)
* v1.4.6 Now installed as binary
* Bioconda and Bioconductor
* BioPython
* Git
Expand Down
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Testing out your changes

After you've added software or updated configurations at `images/custom`, you can and should test in a local instance of Jupyter Notebooks. We've made this really easy for you. You can either leverage the extensive Makefile support for building and testing an updated user image, or manually drive the process.
After you've added software or updated configurations at `images/sd2e`, you can and should test in a local instance of Jupyter Notebooks. We've made this really easy for you. You can either leverage the extensive Makefile support for building and testing an updated user image, or manually drive the process.

*Before you issue a PR, you must have tested locally*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.1
0.3.3
5 changes: 3 additions & 2 deletions build/build_jupyteruser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ function testImage {
EIP=$(dig +short myip.opendns.com @resolver1.opendns.com)
ed "Local Address: http://localhost:8888"
ed "External Address: http://${EIP}:8888"
ed "docker run --rm -p 8888:8888 ${IMG}:${VERSION} start-notebook.sh"
# Added -u flag to test as non-existent user
ed "docker run -u 1337 --rm -p 8888:8888 ${IMG}:${VERSION} start-notebook.sh"
docker run --rm -p 8888:8888 ${IMG}:${VERSION} start-notebook.sh
if [ ! $? -eq 0 ]; then
ee "Notebook could not launch"
Expand Down Expand Up @@ -153,7 +154,7 @@ function pushImage {
fi
}

helpStr="Usage: $0 option target\n\nAutomating the build and deploy process for taccsciapps images\n\nPlease specify an option and target\n\nOptions:\n - build\n - test\n - push\n - all\n\nTargets:\n - images/base\n - images/custom"
helpStr="Usage: $0 option target\n\nAutomating the build and deploy process for taccsciapps images\n\nPlease specify an option and target\n\nOptions:\n - build\n - test\n - push\n - all\n\nTargets:\n - images/base\n - images/sd2e"

# Make sure enough arguments were used
if [ ! $# -eq 2 ]; then
Expand Down
Loading

0 comments on commit 78cec3a

Please sign in to comment.