1+ FROM python:3.9-slim@sha256:5f0192a4f58a6ce99f732fe05e3b3d00f12ae62e183886bca3ebe3d202686c7f
2+
3+ ENV PATH /usr/local/bin:$PATH
4+ ENV PYTHON_VERSION 3.9.17
5+
6+ RUN \
7+ adduser --system --disabled-password --shell /bin/bash vscode && \
8+ # install docker
9+ apt-get update && \
10+ apt-get install ca-certificates curl gnupg lsb-release -y && \
11+ mkdir -m 0755 -p /etc/apt/keyrings && \
12+ curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
13+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
14+ apt-get update && \
15+ apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y && \
16+ usermod -aG docker vscode && \
17+ apt-get clean
18+
19+ RUN \
20+ # dev setup
21+ apt update && \
22+ apt-get install sudo git bash-completion graphviz default-mysql-client s3fs procps -y && \
23+ usermod -aG sudo vscode && \
24+ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
25+ pip install --no-cache-dir --upgrade black pip nbconvert && \
26+ echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \
27+ echo 'export PS1="\[\e [32;1m\]\u\[\e [m\] @\[\e [34;1m\]\H\[\e [m\] :\[\e [33;1m\]\w\[\e [m\] $ "' >> /home/vscode/.bashrc && \
28+ apt-get clean
29+
30+ COPY ./ /tmp/element-moseq/
31+
32+ RUN \
33+ # pipeline dependencies
34+ apt-get install gcc g++ ffmpeg libsm6 libxext6 libgl1 libegl1 -y && \
35+ pip install --no-cache-dir -e /tmp/element-moseq[elements,tests] && \
36+ # clean up
37+ rm -rf /tmp/element-moseq/ && \
38+ apt-get clean
39+
40+ # Install Keypoint-MoSeq (CPU version)
41+ RUN pip install "jax[cpu]==0.3.22" -f https://storage.googleapis.com/jax-releases/jax_releases.html
42+
43+ ENV DJ_HOST fakeservices.datajoint.io
44+ ENV DJ_USER root
45+ ENV DJ_PASS simple
46+
47+ ENV KPMS_ROOT_DATA_DIR /workspaces/element-moseq/example_data/inbox
48+ ENV KPMS_ROOT_OUTPUT_DIR /workspaces/element-moseq/example_data/outbox
49+ ENV DATABASE_PREFIX neuro_
50+
51+ USER vscode
52+ CMD bash -c "sudo rm /var/run/docker.pid; sudo dockerd"
53+
54+ ENV LD_LIBRARY_PATH="/lib:/opt/conda/lib"
0 commit comments