Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 31 lines (24 sloc) 1.02 KB
#!/usr/bin/env bash
# purpose: Create Docker image with Ubuntu 18.04 and Anaconda 3
# maintainer: Ravi Chandran
# Stop HTTP server in case it was already running
# Reference: https://stackoverflow.com/a/37214138
kill -9 `ps -ef | grep http.server | grep 8888 | awk '{print $2}'`
# Start HTTP server to serve files from the folder named installer
# Place the file downloaded from https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
# in installer/
# Note that 10.0.2.15 is one of the interface IP addresses that
# shows up inside a VirtualBox VM associated with an interface
cd installer
python3 -m http.server --bind 10.0.2.15 8888 &
cd ..
ANACONDA=Anaconda3-2019.10-Linux-x86_64.sh
time docker image build \
--build-arg USERNAME=${USER} \
--build-arg ANACONDA=$ANACONDA \
--file install_anaconda.dockerfile \
--tag anaconda_ubuntu1804:v1 . \
|& tee $BASH_SOURCE.log
# Stop HTTP server
kill -9 `ps -ef | grep http.server | grep 8888 | awk '{print $2}'`
docker image ls