forked from microsoft/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 998 Bytes
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 998 Bytes
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
# basic setup
FROM ubuntu:18.04
RUN apt-get update && apt-get -y update
RUN apt-get install -y build-essential python3.6 python3-pip git
# Register the version in alternatives
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
# Set python 3 as the default python
RUN update-alternatives --set python /usr/bin/python3.6
RUN pip3 -q install pip --upgrade
# Install HB
RUN pip3 install hummingbird-ml
# Install HB dev tools
RUN pip3 install flake8 coverage autopep8 jupyter pre-commit pytest
# Jupyter
EXPOSE 8888
# Create a new system user
RUN useradd -ms /bin/bash jupyter
# Change to this new user
USER jupyter
# Pull repo to get notebooks
RUN cd ~/ && git clone https://github.com/microsoft/hummingbird.git
# Install precommit hooks
RUN cd ~/hummingbird && pre-commit install
# Set the container working directory to the user home folder
WORKDIR /home/jupyter/hummingbird/notebooks
# Start the jupyter notebook
ENTRYPOINT ["jupyter", "notebook", "--ip=*"]