-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
46 lines (36 loc) · 1.01 KB
/
Dockerfile
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
40
41
42
43
44
45
46
FROM python:3.7-slim-buster
MAINTAINER Strateos <[email protected]>
# Default userid=1000 as that is the first non-root userid on linux
ARG NB_UID=1000
ARG NB_USER=txpy
# Dependencies for scientific libraries
RUN apt-get update --fix-missing && \
apt-get install -y \
pkg-config \
libjpeg-dev \
zlib1g-dev \
libblas-dev \
liblapack-dev \
gfortran \
wget \
git \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Change default install directory of pip and eggs
RUN mkdir /pip_cache && \
mkdir /python_eggs
ENV XDG_CONFIG_HOME /pip_cache
ENV PYTHON_EGG_CACHE /python_eggs
# Install Jupyter, nbgitpuller for separate notebook/environment
RUN pip install --no-cache-dir notebook==5.* && \
pip install nbgitpuller==1.*
# Install TxPy
RUN pip install 'transcriptic[jupyter, analysis]'
# Add user txpy with specified uid
RUN useradd -u $NB_UID -m -s /bin/bash $NB_USER
ENV HOME /home/$NB_USER
WORKDIR /home/$NB_USER
RUN chown -R $NB_USER /home/$NB_USER
USER $NB_USER
ENTRYPOINT []