Skip to content

Commit 50a0a19

Browse files
author
Cyrille Pierre Henri Favreau
committed
Docker image
1 parent 69fd48a commit 50a0a19

File tree

15 files changed

+317
-71
lines changed

15 files changed

+317
-71
lines changed

.github/workflows/docker_push.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on: [push]
2+
3+
jobs:
4+
nuon_model_visualizer_job:
5+
runs-on: ubuntu-latest
6+
name: NuonModelVisualizer
7+
steps:
8+
- uses: actions/checkout@v2
9+
name: Check out code
10+
- name: Login to DockerHub
11+
uses: docker/login-action@v1.8.0
12+
with:
13+
username: ${{ secrets.DOCKERHUB_USERNAME }}
14+
password: ${{ secrets.DOCKERHUB_TOKEN }}
15+
- name: Build and push Docker Python SDK image
16+
uses: docker/build-push-action@v2
17+
with:
18+
context: .
19+
push: true
20+
tags: ${{ secrets.DOCKERHUB_ORGANIZATION }}/nuon-model-visualizer:latest
21+
- name: Image digest
22+
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/docker_tag.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on:
2+
push:
3+
tags:
4+
- 1.*
5+
6+
jobs:
7+
bioexplorer_job:
8+
runs-on: ubuntu-latest
9+
name: NuonModelVisualizer
10+
steps:
11+
- uses: actions/checkout@v2
12+
name: Check out code
13+
- name: Get tag
14+
id: tag
15+
uses: dawidd6/action-get-tag@v1
16+
- name: Use tag
17+
run: echo ${{steps.tag.outputs.tag}}
18+
- name: Login to DockerHub
19+
uses: docker/login-action@v1.8.0
20+
with:
21+
username: ${{ secrets.DOCKERHUB_USERNAME }}
22+
password: ${{ secrets.DOCKERHUB_TOKEN }}
23+
- name: Build and push Docker Python SDK image
24+
uses: docker/build-push-action@v2
25+
with:
26+
context: .
27+
push: true
28+
tags: ${{ secrets.DOCKERHUB_ORGANIZATION }}/nuon-model-visualizer:${{steps.tag.outputs.tag}}
29+
- name: Image digest
30+
run: echo ${{ steps.docker_build.outputs.digest }}

Dockerfile

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
# The Blue Brain BioExplorer is a tool for scientists to extract and analyse
3+
# scientific data from visualization
4+
#
5+
# Copyright 2020-2023 Blue BrainProject / EPFL
6+
#
7+
# This program is free software: you can redistribute it and/or modify it under
8+
# the terms of the GNU General Public License as published by the Free Software
9+
# Foundation, either version 3 of the License, or (at your option) any later
10+
# version.
11+
#
12+
# This program is distributed in the hope that it will be useful, but WITHOUT
13+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15+
# details.
16+
#
17+
# You should have received a copy of the GNU General Public License along with
18+
# this program. If not, see <https://www.gnu.org/licenses/>.
19+
20+
FROM python:3.10-slim as builder
21+
LABEL maintainer="cyrille.favreau@epfl.ch"
22+
23+
ARG DIST_PATH=/app
24+
25+
RUN apt-get update && \
26+
apt-get install -y --no-install-recommends wget git g++ gcc binutils libxpm-dev libxft-dev libxext-dev python3 libssl-dev && \
27+
apt-get clean && \
28+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
29+
30+
# --------------------------------------------------------------------------------
31+
# Install ROOT
32+
# --------------------------------------------------------------------------------
33+
ARG ROOT_VERSION=6.30.04
34+
ARG ROOT_DIR=root_v${ROOT_VERSION}.Linux-ubuntu22.04-x86_64-gcc11.4
35+
ARG ROOT_PATH=/app/$ROOT_DIR
36+
37+
RUN mkdir -p ${ROOT_PATH} \
38+
&& wget --no-verbose https://root.cern/download/${ROOT_DIR}.tar.gz \
39+
&& tar zxvf ${ROOT_DIR}.tar.gz -C ${ROOT_PATH} --strip-components=1 \
40+
&& rm ${ROOT_DIR}.tar.gz
41+
42+
# Add ROOT bin to the PATH
43+
ENV PATH $PATH:${ROOT_PATH}/bin
44+
ENV PYTHONPATH $PYTHONPATH:${ROOT_PATH}/lib
45+
46+
WORKDIR /app
47+
ADD . /app/NuonModelVisualizer
48+
49+
RUN cd /app/NuonModelVisualizer && \
50+
python3 -m venv /app/NuonModelVisualizer/env \
51+
&& . /app/NuonModelVisualizer/env/bin/activate \
52+
&& python3 -m pip install --upgrade pip --use-deprecated=legacy-resolver \
53+
&& python3 -m pip install wheel \
54+
&& python3 -m pip install -e .
55+
56+
# --------------------------------------------------------------------------------
57+
# Install BioExplorer
58+
# https://github.com/favreau/BioExplorer
59+
# --------------------------------------------------------------------------------
60+
ARG BIOEXPLORER_SRC=/app/bioexplorer
61+
62+
RUN mkdir -p ${BIOEXPLORER_SRC} \
63+
&& git clone https://github.com/favreau/BioExplorer.git ${BIOEXPLORER_SRC} \
64+
&& cd ${BIOEXPLORER_SRC}/bioexplorer/pythonsdk \
65+
&& . /app/NuonModelVisualizer/env/bin/activate \
66+
&& pip install . --use-deprecated=legacy-resolver \
67+
&& cd /app \
68+
&& rm -rf ${BIOEXPLORER_SRC}
69+
70+
# --------------------------------------------------------------------------------
71+
# Install Rockets (from favreau for Python 3.10)
72+
# https://github.com/favreau/Rockets
73+
# --------------------------------------------------------------------------------
74+
ARG ROCKETS_SRC=/app/rockets
75+
76+
RUN mkdir -p ${ROCKETS_SRC} \
77+
&& git clone https://github.com/favreau/Rockets.git ${ROCKETS_SRC} \
78+
&& cd ${ROCKETS_SRC}/python \
79+
&& . /app/NuonModelVisualizer/env/bin/activate \
80+
&& pip install . --use-deprecated=legacy-resolver \
81+
&& pip install numpy==1.22.4 \
82+
&& cd /app \
83+
&& rm -rf ${ROCKETS_SRC}
84+
85+
RUN rm -rf /tmp/*
86+
87+
ENV PATH /app/NuonModelVisualizer:$PATH
88+
89+
RUN chmod +x /app/NuonModelVisualizer/nuon_model_visualizer_python_sdk
90+
91+
# Expose a port from the container
92+
# For more ports, use the `--expose` flag when running the container,
93+
# see https://docs.docker.com/engine/reference/run/#expose-incoming-ports for docs.
94+
EXPOSE 8888
95+
96+
ENTRYPOINT ["nuon_model_visualizer_python_sdk"]

Nuon_Model_Visualizer.egg-info/SOURCES.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

Nuon_Model_Visualizer.egg-info/dependency_links.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Nuon_Model_Visualizer.egg-info/requires.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

Nuon_Model_Visualizer.egg-info/top_level.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

build/lib/nuon_model_visualizer/__init__.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

build/lib/nuon_model_visualizer/version.py

Lines changed: 0 additions & 23 deletions
This file was deleted.
8.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)