Skip to content

Commit 3f0e427

Browse files
committed
Add initial docker file
1 parent 0c5a739 commit 3f0e427

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
curl \
8+
software-properties-common \
9+
git \
10+
libxrender1 procps libgl1-mesa-glx xvfb \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
14+
COPY requirements.txt ./
15+
RUN pip3 install -r requirements.txt
16+
17+
18+
COPY *.py *.stl *.obj ./
19+
COPY Sibernetic/* ./Sibernetic/
20+
COPY NeuroML2/* ./NeuroML2/
21+
COPY NeuroML2/cells/* ./NeuroML2/cells/
22+
23+
EXPOSE 8501
24+
25+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
26+
27+
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]

generate.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
no_cache_flag=""
5+
if [[ ($# -eq 1) && ($1 == '-r') ]]; then
6+
no_cache_flag="--no-cache"
7+
fi
8+
9+
# Set the platform flag if we're on ARM
10+
arch=$(uname -m)
11+
if [[ "$arch" == "arm64" || "$arch" == "aarch64" ]]; then
12+
platform_flag="--platform linux/amd64"
13+
else
14+
platform_flag=""
15+
fi
16+
17+
18+
docker build $platform_flag -t worm3dviewer $no_cache_flag .

requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Worm3DViewer Requirements
1+
altair
2+
pandas
3+
streamlit
4+
vtk
25
pyvista
36
stpyvista
47

runLocal.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run -p 8501:8501 -i -t worm3dviewer /bin/bash

0 commit comments

Comments
 (0)