Code Monkey home page Code Monkey logo

spt3g-docker's Introduction

SPT3G Docker Container

Python version License

Play with the SPT3G software suit on any operating system within an isolated Docker container. This repository was created to enable users to prototype and run spt3g code to a limited extent on local machines especially when access to the internet may be limited. This container is built on ubuntu:20.04 with python:3.8.10 and comes with:

Installation & Use

Install the appropriate version of Docker for your operating system : https://docs.docker.com/engine/install

We can then build the docker image using the provieded Dockerfile:

git clone [email protected]:amanchokshi/spt3g-docker.git
cd spt3g-docker

# Copy or clone the spt3g_software repo here
# Need to be a part of the SPT3G Colab for this
git clone [email protected]:SouthPoleTelescope/spt3g_software.git

# Build the image with any tag [-t]
docker build . -t achokshi/spt3g

Create a directory to mount to the docker container. Once mounted it will be available to your host computer and within the docker container, serving as a location to put data and save outputs to:

mkdir ~/spt3g-docker

Run the container with:

docker run --rm -it \
    -v ~/spt3g-docker:/root/spt3g-docker \
    -p 8888:8888 -p 3141:3141 \
    --hostname spt3g \
    achokshi/spt3g

The --rm flag shuts down and cleans up the running container once you're done, while the -it flag provides an interactive terminal. The -v --volume flag mounts the local ~/spt3g-docker volume to the corresponding /root/spt3g-docker directory within the docker container. The -p or flag publishes the container's port(s) to the host. Port 8888 is dedicated for Jupyter while port 3141 is reserved to host a local copy of spt3g_software documentation. achokshi/spt3g is the tag of the docker image which we pulled in previous steps. If the image runs succesfully you will see:

##############################################

Welcome to the SPT3G Docker Container
SPT3G Environment Variables Set
SPT3G Docs Availabel at http://localhost:3141

##############################################

root@spt3g:~#

Files which you put within ~/spt3g-docker will now be available to you. A local version of the documentation is available at http://localhost:3141 once the above commands have been succesfully executed.

Jupyter

Jupyter notebooks are a common tool for interactive data analysis and can be run from this container with:

jupyter-lab --port=8888 --no-browser --ip=0.0.0.0 --allow-root

Any notebooks or data you create will be saved in your ~/spt-docker directory and be available after the container is shutdown.

Build Docker Image

SPT3G Tests

You should run tests to see that nothing broke in the build:

root@spt3g:~# cd spt3g_software/
root@spt3g:~/spt3g_software# cd build/
root@spt3g:~/spt3g_software/build# make test
Running tests...
..
..
100% tests passed, 0 tests failed out of 54

Hooray!!

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.