Files
docker-qt/Dockerfile

121 lines
4.9 KiB
Docker
Raw Normal View History

2022-09-26 21:34:47 -04:00
FROM ubuntu:22.04
2020-05-27 00:32:11 -04:00
2022-09-26 21:37:15 -04:00
# RUN echo 'Acquire::http { Proxy "http://192.168.1.2:3142"; };' >> /etc/apt/apt.conf.d/00proxy
2022-03-12 13:07:09 -05:00
2021-04-09 20:28:59 -04:00
ENV DEBIAN_FRONTEND=noninteractive
2023-01-13 19:11:16 -05:00
# Install apt packages and Bazel and CUDA (# https://developer.nvidia.com/cuda-downloads)
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 && \
2023-01-13 19:09:47 -05:00
apt-get -yq upgrade && \
apt-get -yq 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 \
2023-01-13 19:13:23 -05:00
linux-tools-generic nano nasm ninja-build openjdk-11-jdk openssh-server openssl pkg-config python3 spawn-fcgi \
2021-03-20 22:19:43 -04:00
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-06-19 13:47:10 -04:00
libconfuse-dev libnl-3-dev libnl-route-3-dev libncurses-dev dh-autoreconf freeglut3 freeglut3-dev libglfw3-dev \
2023-01-13 19:13:23 -05:00
apt-transport-https g++ graphviz xdot golang-go qt6-base-dev && \
2023-01-13 19:17:42 -05:00
go version && \
2023-01-13 19:09:47 -05:00
ssh-keygen -A && \
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > /usr/share/keyrings/bazel.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \
2021-06-19 13:47:10 -04:00
apt-get update && \
2023-01-13 19:09:47 -05:00
apt-get -yq install bazel && \
2021-06-22 20:00:23 -04:00
bazel --version && \
2023-01-13 19:09:47 -05:00
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
2021-06-20 02:09:39 -04:00
apt-get update && \
2023-01-13 19:11:16 -05:00
apt-get -yq install cuda && \
2023-01-13 19:09:47 -05:00
apt-get -yq autoremove && \
apt-get -yq autoclean && \
apt-get -yq clean && \
2021-06-20 02:09:39 -04:00
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
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
2023-01-13 19:09:47 -05: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 \
2023-01-13 19:09:47 -05:00
pip3 install --upgrade Cython cmdstanpy pystan 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
2023-01-13 19:09:47 -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-01-31 19:01:57 -05:00
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-06-22 23:36:25 -04:00
# Install buildifier
Run go get github.com/bazelbuild/buildtools/buildifier
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 && \
2020-05-27 00:32:11 -04:00
exit 0
2021-01-25 21:15:25 -05:00
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