Skip to content

Commit 453b896

Browse files
committed
wip: init
1 parent 9a21d37 commit 453b896

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed

Dockerfile

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM ubuntu:18.04
2+
3+
# Install: vim, git, cron, wget
4+
RUN apt-get update && apt-get -y install apt-file && apt-file update && \
5+
apt-get -y install cron vim git wget sudo gcc curl
6+
7+
# place to keep our app and the data:
8+
RUN mkdir -p /app && mkdir -p /app/logs && mkdir -p /data && mkdir -p /_tmp
9+
10+
WORKDIR /app
11+
12+
# Create a non-root user and switch to it
13+
RUN adduser --disabled-password --gecos '' --shell /bin/bash user && \
14+
chown -R user:user /app
15+
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
16+
USER user
17+
18+
RUN sudo chown -R user:users /data /app /_tmp
19+
20+
# All users can use /home/user as their home directory
21+
ENV HOME=/home/user
22+
RUN chmod 777 /home/user
23+
24+
# Install latest Miniconda
25+
RUN curl -so ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
26+
chmod +x ~/miniconda.sh && \
27+
~/miniconda.sh -b -p ~/miniconda
28+
ENV PATH=/home/user/miniconda/bin:$PATH
29+
ENV CONDA_AUTO_UPDATE_CONDA=false
30+
31+
32+
# copy code over and install python libs
33+
COPY braai/requirements.cpu.txt /app/
34+
RUN pip install -r /app/requirements.cpu.txt
35+
COPY braai/ /app/
36+
37+
# copy over the secrets:
38+
#COPY secrets.json /app/
39+
40+
CMD /bin/bash

braai/requirements.cpu.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
aiohttp>=3.4.4
2+
astropy>=3.0.5
3+
bcrypt>=3.1.4
4+
cchardet>=2.1.1
5+
h5py>=2.8.0
6+
matplotlib>=3.0.1
7+
numpy>=1.15.4
8+
motor>=2.0.0
9+
pandas>=0.23.4
10+
pymongo>=3.7.2
11+
pytz>=2017.3
12+
scikit-image>=0.13.1
13+
scikit-learn>=0.19.1
14+
scipy>=1.2.1
15+
tensorflow==2.0.0-beta0
16+
tqdm>=4.30.0
17+
-e git://github.com/dmitryduev/kowalski.git#egg=penquins
18+
-e git://github.com/dmitryduev/zwickyverse.git#egg=zwickyverse
19+
-e git://github.com/Supervisor/supervisor.git#egg=supervisor

braai/requirements.gpu.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
aiohttp>=3.4.4
2+
astropy>=3.0.5
3+
bcrypt>=3.1.4
4+
cchardet>=2.1.1
5+
h5py>=2.8.0
6+
matplotlib>=3.0.1
7+
numpy>=1.15.4
8+
motor>=2.0.0
9+
pandas>=0.23.4
10+
pymongo>=3.7.2
11+
pytz>=2017.3
12+
scikit-image>=0.13.1
13+
scikit-learn>=0.19.1
14+
scipy>=1.2.1
15+
tqdm>=4.30.0
16+
-e git://github.com/dmitryduev/kowalski.git#egg=penquins
17+
-e git://github.com/dmitryduev/zwickyverse.git#egg=zwickyverse
18+
-e git://github.com/Supervisor/supervisor.git#egg=supervisor

gpu.Dockerfile

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
FROM nvidia/cuda:10.0-devel-ubuntu18.04
2+
3+
# Install: vim, git, cron, wget
4+
RUN apt-get update && apt-get -y install apt-file && apt-file update && \
5+
apt-get -y install cron vim git wget sudo gcc curl && \
6+
apt-get -y install gnupg2
7+
8+
# place to keep our app and the data:
9+
RUN mkdir -p /app && mkdir -p /app/logs && mkdir -p /data && mkdir -p /_tmp
10+
11+
WORKDIR /app
12+
13+
ENV CUDNN_VERSION 7.5.0.56
14+
15+
RUN apt-get update && apt-get install -y --no-install-recommends \
16+
libcudnn7=$CUDNN_VERSION-1+cuda10.0 \
17+
libcudnn7-dev=$CUDNN_VERSION-1+cuda10.0 && \
18+
apt-mark hold libcudnn7 && \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
22+
# Install TensorRT. Requires that libcudnn7 is installed above.
23+
#RUN apt-get update && \
24+
# apt-get install -y nvinfer-runtime-trt-repo-ubuntu1804-5.0.2-ga-cuda10.0 && \
25+
# apt-get update && \
26+
# apt-get install -y --no-install-recommends libnvinfer-dev=5.0.2-1+cuda10.0
27+
28+
# Create a non-root user and switch to it
29+
RUN adduser --disabled-password --gecos '' --shell /bin/bash user && \
30+
chown -R user:user /app
31+
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
32+
USER user
33+
34+
RUN sudo chown -R user:users /data /app /_tmp
35+
36+
# All users can use /home/user as their home directory
37+
ENV HOME=/home/user
38+
RUN chmod 777 /home/user
39+
40+
# Install latest Miniconda
41+
RUN curl -so ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
42+
chmod +x ~/miniconda.sh && \
43+
~/miniconda.sh -b -p ~/miniconda
44+
ENV PATH=/home/user/miniconda/bin:$PATH
45+
ENV CONDA_AUTO_UPDATE_CONDA=false
46+
47+
# copy code over and install python libs
48+
COPY braai/requirements.gpu.txt /app/
49+
RUN pip install -r /app/requirements.gpu.txt
50+
RUN pip install tensorflow-gpu==2.0.0b0
51+
COPY braai/ /app/
52+
53+
# copy over the secrets:
54+
#COPY secrets.json /app/
55+
56+
CMD /bin/bash

0 commit comments

Comments
 (0)