-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (48 loc) · 1.68 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Docker commands
# First download the repository bp
# make sure you have Dockerfile in pwd
# -t will allow to run the command in the terminal
# --no-cache will remove cache so that you can change
# files and build new container.
#docker build --no-cache -t bp .
# docker images
# expose the port to ouside and run the docker container.
# docker run -it -p 8888:8888 bp
# docker ps
# Go to the terminal of the container
# pwd
# ls
# whoami # root
# docker exec -it GET_CONTANER_ID_FROM_docker_ps /bin/sh
# jupyter notebook --no-browser --allow-root --port=8888 --ip=0.0.0.0
# Open the second link given by this command.
# docker stop bp
# docker rmi -f bp
FROM python:3.7
# Update the OS as needed
RUN apt-get update
# install vim so that you can use vim on docker terminal
RUN apt-get install -y nmap vim
# Get TEX fonts for jupyter notebook
RUN apt-get install texlive-latex-recommended -y
RUN apt-get install texlive-latex-extra -y
RUN apt-get install texlive-fonts-recommended -y
RUN apt-get install chktex -y
RUN apt-get install dvipng -y
# Install python requirements using pip:
RUN pip install --upgrade jupyter
RUN pip install nbconvert
# Install modules for development (not required in production)
#RUN pip install sphinx
#RUN pip install sphinx_rtd_theme
# Install the dependencies and the package:
WORKDIR /home
RUN git clone https://github.com/bhishanpdl/bp.git
WORKDIR /home/bp
RUN pip install -r requirements.txt
RUN python setup.py install
# cd to the work directory and launch a jupyter notebook on run
#WORKDIR /home/bp/docs/notebooks
#CMD jupyter notebook --no-browser --allow-root --port=8888 --ip=0.0.0.0
# Go to this directory when the container is started
WORKDIR /home/bp/docs