2020-05-13 01:25:28 +03:00
|
|
|
# basic setup
|
2022-06-29 18:35:52 +03:00
|
|
|
FROM mcr.microsoft.com/mirror/docker/library/python:3.8-buster
|
2020-05-13 01:25:28 +03:00
|
|
|
RUN apt-get update && apt-get -y update
|
2020-06-23 00:44:19 +03:00
|
|
|
RUN apt-get install -y sudo git
|
2020-05-13 01:25:28 +03:00
|
|
|
|
2020-06-23 00:44:19 +03:00
|
|
|
# Setup user to not run as root
|
|
|
|
RUN adduser --disabled-password --gecos '' hb-dev
|
|
|
|
RUN adduser hb-dev sudo
|
|
|
|
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
USER hb-dev
|
2020-05-13 01:25:28 +03:00
|
|
|
|
2020-06-23 00:44:19 +03:00
|
|
|
# Pull repo
|
|
|
|
RUN cd /home/hb-dev && git clone https://github.com/microsoft/hummingbird.git
|
|
|
|
WORKDIR /home/hb-dev/hummingbird
|
2020-05-13 01:25:28 +03:00
|
|
|
|
2020-06-23 00:44:19 +03:00
|
|
|
# Install HB (Note: you may not need all of these packages and can remove some)
|
2022-07-08 19:26:28 +03:00
|
|
|
RUN sudo python -m pip install -e .[docs,tests,extra,onnx]
|
2020-05-13 01:25:28 +03:00
|
|
|
|
|
|
|
# Install precommit hooks
|
2020-06-23 00:44:19 +03:00
|
|
|
RUN pre-commit install
|
2020-05-13 01:25:28 +03:00
|
|
|
|
2020-06-23 00:44:19 +03:00
|
|
|
# override default image starting point
|
|
|
|
CMD /bin/bash
|
2022-06-29 18:35:52 +03:00
|
|
|
ENTRYPOINT []
|