Giter VIP home page Giter VIP logo

loco's Introduction

loco with flavours

want

  • then
    • play with devcontainer.json templates/features to see if their is a better way (think about handling project requirements/not having to host images)
    • user options in devcontainer spec to match up with jovyan etc for settings
    • customise codespace experience using devcontainer.json, .vscode and github dotfiles
    • experiment with using a much smaller base image and only adding in useful things
    • rust?
    • jupyterlab codespace?
    • remote hosting on personal metal
    • env vars or tags or similar to custom dev env

have

  • initial
    • Dockerfile to produce a useful baseline container (NB - VERY LARGE)
    • devcontainer.json to use that container in codespaces
    • shell scripts build container locally, push container to registry (hub) and run container locally with bind mounts

config

Can either load config files from a project repo each time and/or store config files in docker volumes for re-use

Docker volumes for config / settings / package caches

  • can use named docker volumes for settings (universal), bind mount for work(project), dockerfile for requirements (project)
    • create a docker volume named jovyan or rstudio to contain stateful setting changes
    • re-use that container to preserve user based application settings
    • ensure that you are overloading the ~/work with a bind mount to current project code and data
alias loco='cmd.exe /C start microsoft-edge:http://localhost:8889; docker run --rm -ti --name "local_loco" -e RESTARTABLE=yes -p 8889:8888/tcp -v jovyan:/home/jovyan -v "$(pwd):/home/jovyan/work" matthewbegun/loco:latest start-notebook.py --IdentityProvider.token=''

scratch

# ruhroh
alias rstudio='cmd.exe /C start microsoft-edge:http://localhost:8787; docker run --name "ruh_roh" --rm -ti -e DISABLE_AUTH=true -p 8787:8787 -v "$(pwd):/home/rstudio/work" rocker/verse:latest'
alias ruhroh='rstudio'
alias rr='rstudio'

# loco
alias loco='cmd.exe /C start microsoft-edge:http://localhost:8889; docker run --name "local_loco" --rm -ti -e RESTARTABLE=yes -p 8889:8888/tcp -v "$(pwd):/home/jovyan/work" matthewbegun/loco:latest start-notebook.py --IdentityProvider.token='' --ServerApp.root_dir=/home/jovyan/work'
alias notbook='loco'
alias nb='loco'

## data containers
# Populate a volume using a container
# the
docker run -d --name notbook \
    -p 8888:8888 \
    -v jovyan:/home/jovyan \
    jupyter/scipy-notebook

docker run -d --name notbooker \
    -p 8888:8888 \
    --volumes-from notbook \
    -v ${PWD}:/home/jovyan/work \
    jupyter/scipy-notebook

# Mount a populated volume into another container(s)
docker run -ti --init --rm \
    -v jovyan:/jovyan \
    busybox

scripts

#!/usr/bin/bash
# pull.bash

# use docker images format option to generate list of images to pull
docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull
#!/usr/bin/bash
# ship.bash

# build all harbor images
find . -name build.bash -execdir bash {} \;

# push all harbor images
find . -name push.bash -execdir bash {} \;

loco's People

Contributors

matthewbegun avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.