Skip to content

Commit

Permalink
Adding particle filter notebook for updating deep learning models
Browse files Browse the repository at this point in the history
  • Loading branch information
Venkatesh Rajagopalan committed Jun 3, 2019
1 parent 5b70cbc commit 1ca4416
Show file tree
Hide file tree
Showing 15 changed files with 2,058 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Source helper functions
source .fun

# Proxy settings [optional] - set if your network requires a proxy to connect to the Internet
export http_proxy=
export https_proxy=
export no_proxy=

# Docker image settings
## REGISTRY: [optional] - Docker registry path including trailing "/". Example: registry.company.com/demo/
export REGISTRY=
## IMAGE: <required> - Docker image name for this project. Example: myapp
export IMAGE=dod_pf_unkunk
## VERSION: [optional] - Version tag for this Docker image. Example: v20180302
export VERSION=
export TAG=$(if [ -z "${VERSION}" ]; then echo ""; else echo ":${VERSION}"; fi)
## BUILD_OPTS: [optional] - arguments for the docker image build command
export BUILD_OPTS="--build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy}"

# Docker container runtime settings
## CONTAINER_NAME: [optional] - Name of the Docker container including the --name switch. Example --name myapp
export CONTAINER=${IMAGE}
export CONTAINER_NAME="--name ${CONTAINER}"
## Port map [optional] - Mapping of external to internal ports including the -p switch. Example -p 80:8080
export PORT_MAP="-p 5555:8888"
## Volume map [optional] - Mapping of external to internal paths including the -v switch. Example $(pwd):/wd
export VOL_MAP="-v $(pwd):/wd"
## Network [optional] - Network name including the --net switch. Example --net mynet
export NETWORK=
## RUN_OPTS [optional] - additional options to specify with the run comman. Example -e POSTGRES_DB=dbname
export RUN_OPTS="-e http_proxy=$http_proxy -e https_proxy=$https_proxy -e no_proxy=$no_proxy --rm"

42 changes: 42 additions & 0 deletions .fun
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Helper functions
## Detect current operating system
function os
{
UNAME=$(uname -a)
if [ $(echo $UNAME | awk '{print $1}') == "Darwin" ]; then
export OPERATING_SYSTEM="MacOS"
elif [ $(echo $UNAME | awk '{print $1}') == "Linux" ]; then
export OPERATING_SYSTEM="Linux"
elif [ ${UNAME:0:5} == "MINGW" ]; then
export OPERATING_SYSTEM="Windows"
export MSYS_NO_PATHCONV=1 # turn off path conversion
else
export OPERATING_SYSTEM="Other"
fi
}
## End os function
os

## Determine current host IP address
function hostip
{
case "${OPERATING_SYSTEM}" in
"Linux")
export HOST_IP=$(hostname -I | tr " " "\n" | head -1) # Linux
;;
"MacOS")
export HOST_IP=$(ifconfig | grep -v 127.0.0.1 | grep -v inet6 | grep inet | head -n 1 | awk '{print $2}') # Mac OS
;;
"Windows")
export HOST_IP=$( ((ipconfig | grep IPv4 | grep 10.187 | tail -1) && (ipconfig | grep IPv4 | grep 3. | head -1)) | tail -1 | awk '{print $14}' ) # Git bash
;;
*)
export HOST_IP=$(hostname)
;;
esac
}
## End hostip function
hostip

5 changes: 5 additions & 0 deletions Container-Root/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy
sklearn
matplotlib
jupyter

9 changes: 9 additions & 0 deletions Container-Root/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

if [ -d /etc/apt ]; then
[ -n "$http_proxy" ] && echo "Acquire::http::proxy \"${http_proxy}\";" > /etc/apt/apt.conf; \
[ -n "$https_proxy" ] && echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; \
[ -f /etc/apt/apt.conf ] && cat /etc/apt/apt.conf
fi


5 changes: 5 additions & 0 deletions Container-Root/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# Container startup script
/bin/bash -c "jupyter notebook --allow-root --ip 0.0.0.0 --no-browser --NotebookApp.token=''"
#./run_jupyter.sh --allow-root
Loading

0 comments on commit 1ca4416

Please sign in to comment.