2021-04-09 21:23:25 -04:00
|
|
|
FROM ubuntu:20.04
|
2020-05-27 00:32:11 -04:00
|
|
|
|
2021-04-09 20:28:59 -04:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install apt packages
|
2018-10-05 09:59:38 -05:00
|
|
|
RUN \
|
2021-01-25 23:50:44 -05:00
|
|
|
set -eux && \
|
2021-02-15 13:54:44 -05:00
|
|
|
apt-get update && \
|
|
|
|
|
apt-get -y upgrade && \
|
|
|
|
|
apt-get -y install \
|
2021-03-21 00:09:06 -04:00
|
|
|
aptitude apt-rdepends bash build-essential ccache clang clang-tidy cmake cppcheck curl doxygen diffstat gawk gdb git gnupg gperf iputils-ping \
|
2021-02-27 12:38:59 -05:00
|
|
|
libboost-all-dev libfcgi-dev libgfortran5 libgl1-mesa-dev libjemalloc-dev libjemalloc2 libmlpack-dev libtbb-dev libssl-dev libyaml-cpp-dev \
|
2021-03-20 22:19:43 -04:00
|
|
|
linux-tools-generic nano nasm ninja-build openjdk-11-jdk openssh-server openssl pkg-config python3 qt5-default spawn-fcgi \
|
|
|
|
|
sudo tini unzip valgrind wget zip texinfo gcc-multilib chrpath socat cpio xz-utils debianutils libegl1-mesa \
|
2021-04-09 20:48:59 -04:00
|
|
|
patch perl tar rsync bc libelf-dev libssl-dev libsdl1.2-dev xterm mesa-common-dev whois software-properties-common \
|
2021-03-20 22:06:37 -04:00
|
|
|
libx11-xcb-dev libxcb-dri3-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev \
|
2021-03-21 12:18:56 -04:00
|
|
|
libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-util-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xkb-dev xorg-dev \
|
2021-04-09 20:28:59 -04:00
|
|
|
libconfuse-dev libnl-3-dev libnl-route-3-dev libncurses-dev dh-autoreconf freeglut3 freeglut3-dev libglfw3-dev && \
|
2021-02-15 13:54:44 -05:00
|
|
|
apt-get -y autoremove && \
|
|
|
|
|
apt-get -y autoclean && \
|
2021-03-21 11:41:26 -04:00
|
|
|
apt-get -y clean && \
|
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
2021-01-25 20:42:27 -05:00
|
|
|
exit 0
|
|
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install python pip
|
2021-01-25 21:11:31 -05:00
|
|
|
RUN \
|
2021-01-25 23:50:44 -05:00
|
|
|
set -eux && \
|
2021-02-15 13:49:12 -05:00
|
|
|
python3 --version && \
|
2021-02-15 13:53:06 -05:00
|
|
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
|
|
|
|
|
python3 get-pip.py && \
|
|
|
|
|
rm get-pip.py && \
|
2021-02-15 13:48:04 -05:00
|
|
|
python3 -m pip install -U pip && \
|
2021-01-26 23:03:35 -05:00
|
|
|
pip3 --version && \
|
2021-01-26 23:17:25 -05:00
|
|
|
pip3 install --upgrade pip setuptools wheel && \
|
2021-01-26 23:03:35 -05:00
|
|
|
pip3 --version && \
|
2021-01-26 23:12:39 -05:00
|
|
|
exit 0
|
|
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install python pip packages
|
2021-01-26 23:12:39 -05:00
|
|
|
RUN \
|
|
|
|
|
set -eux && \
|
|
|
|
|
pip3 --version && \
|
2021-01-26 23:17:52 -05:00
|
|
|
pip3 install --upgrade pip setuptools wheel && \
|
|
|
|
|
pip3 --version && \
|
2021-03-20 23:55:46 -04:00
|
|
|
pip3 install --upgrade autoenv autopep8 cmake-format clang-format conan conan_package_tools meson && \
|
|
|
|
|
pip3 install --upgrade cppclean flawfinder lizard pygments pybind11 GitPython pexpect subunit Jinja2 pylint CLinters && \
|
2021-03-21 12:43:00 -04:00
|
|
|
pip3 install --upgrade ipython jupyter matplotlib nose numba numpy pandas pymc3 PyWavelets requests scikit-learn scipy seaborn sympy quandl textblob nltk yfinance && \
|
2021-02-27 13:27:11 -05:00
|
|
|
exit 0
|
|
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
RUN pip3 install --upgrade PyPortfolioOpt
|
2021-03-20 23:55:46 -04:00
|
|
|
RUN pip3 install --upgrade dlib
|
2021-04-09 20:28:59 -04:00
|
|
|
RUN pip3 install --upgrade frida frida-tools
|
2021-06-06 00:03:29 -04:00
|
|
|
RUN pip3 install --upgrade vaex
|
2021-04-09 21:23:25 -04:00
|
|
|
#RUN pip3 install --upgrade --ignore-installed cltk
|
2021-03-20 23:55:46 -04:00
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install FB Prophet
|
2021-04-09 20:46:42 -04:00
|
|
|
# https://github.com/facebook/prophet/blob/master/python/requirements.txt
|
2021-02-27 13:27:11 -05:00
|
|
|
RUN \
|
2021-04-09 20:42:24 -04:00
|
|
|
pip3 install --upgrade Cython cmdstanpy==0.9.68 pystan~=2.19.1.1 numpy pandas matplotlib LunarCalendar convertdate holidays setuptools-git python-dateutil tqdm && \
|
2021-02-27 13:27:11 -05:00
|
|
|
pip3 install --upgrade fbprophet && \
|
2021-01-25 21:22:50 -05:00
|
|
|
exit 0
|
|
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install vcpkg
|
2021-01-31 19:01:57 -05:00
|
|
|
#RUN \
|
|
|
|
|
# set -eux && \
|
|
|
|
|
# cd /root && \
|
|
|
|
|
# git clone https://github.com/Microsoft/vcpkg.git && \
|
|
|
|
|
# cd vcpkg && \
|
|
|
|
|
# ./bootstrap-vcpkg.sh && \
|
|
|
|
|
# ./vcpkg integrate install && \
|
|
|
|
|
# vcpkg install pybind11 && \
|
|
|
|
|
# exit 0
|
|
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install conan
|
2021-01-25 21:22:50 -05:00
|
|
|
RUN \
|
2021-01-25 23:50:44 -05:00
|
|
|
set -eux && \
|
2021-01-25 21:22:50 -05:00
|
|
|
conan profile new default --detect && \
|
|
|
|
|
conan profile update settings.compiler.libcxx=libstdc++11 default && \
|
2021-01-25 21:48:27 -05:00
|
|
|
conan remote list && \
|
2021-01-25 23:31:45 -05:00
|
|
|
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan && \
|
2021-01-25 21:11:31 -05:00
|
|
|
exit 0
|
2021-01-25 20:42:27 -05:00
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Setup ssh
|
2021-01-25 20:42:27 -05:00
|
|
|
RUN \
|
2021-01-25 23:50:44 -05:00
|
|
|
set -eux && \
|
2021-01-25 20:42:27 -05:00
|
|
|
mkdir -p /var/run/sshd && \
|
|
|
|
|
mkdir -p /root/.ssh && \
|
|
|
|
|
sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config && \
|
|
|
|
|
sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config && \
|
2021-03-21 12:18:56 -04:00
|
|
|
groupadd -g 1000 myuser && \
|
|
|
|
|
useradd --system --no-log-init --create-home --home-dir /home/myuser --gid myuser --groups sudo --uid 1000 --shell /bin/bash myuser && \
|
2021-01-25 20:42:27 -05:00
|
|
|
echo 'root:root' | chpasswd && \
|
2021-03-21 11:51:13 -04:00
|
|
|
echo 'myuser:myuser' | chpasswd && \
|
2021-03-21 12:09:08 -04:00
|
|
|
ssh-keygen -A && \
|
2020-05-27 00:32:11 -04:00
|
|
|
exit 0
|
2021-01-25 21:15:25 -05:00
|
|
|
|
2021-04-09 21:23:25 -04:00
|
|
|
# Install cuda
|
2021-04-09 20:46:42 -04:00
|
|
|
RUN \
|
|
|
|
|
set -eux && \
|
|
|
|
|
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin && \
|
|
|
|
|
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \
|
|
|
|
|
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub && \
|
|
|
|
|
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" && \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get -y install cuda && \
|
|
|
|
|
exit 0
|
|
|
|
|
|
2021-04-09 20:28:59 -04:00
|
|
|
ENV IGNORE_CC_MISMATCH=1
|
|
|
|
|
ENV PATH=$PATH:/usr/local/cuda/bin
|
|
|
|
|
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
|
|
|
|
|
|
2021-01-25 22:14:13 -05:00
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
|
|
|
|
CMD ["/usr/sbin/sshd", "-D", "-e"]
|
2021-03-21 11:36:51 -04:00
|
|
|
|
2021-03-21 12:09:08 -04:00
|
|
|
# USER myuser
|
|
|
|
|
# WORKDIR /home/myuser
|