-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47ad03d
commit e2da240
Showing
10 changed files
with
1,711 additions
and
1,859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,73 @@ | ||
# FROM ubuntu:latest | ||
# # FROM ghcr.io/biosimulators/biosimulators:latest | ||
# | ||
# WORKDIR /app | ||
# | ||
# COPY . /app | ||
# | ||
# RUN apt-get update && apt-get install -y \ | ||
# build-essential \ | ||
# cmake \ | ||
# gcc \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
# | ||
# RUN pip install --upgrade pip \ | ||
# && pip install poetry | ||
# | ||
# RUN poetry run pip install --upgrade pip \ | ||
# && poetry run pip install smoldyn \ | ||
# && poetry install | ||
# # && pip install . | ||
|
||
# Start with the latest Ubuntu base image | ||
FROM ubuntu:latest | ||
|
||
RUN echo "Installing singularity..." | ||
RUN apt-get update -y && apt-get install -y \ | ||
build-essential \ | ||
libseccomp-dev \ | ||
pkg-config \ | ||
squashfs-tools | ||
# cryptsetup | ||
|
||
ENV GO_VERSION "1.20" | ||
ENV SINGULARITY_VERSION "3.9.5" | ||
ENV OS "linux" | ||
ENV ARCH "amd64" | ||
|
||
RUN echo "Installing Go..." \ | ||
RUN wget https://dl.google.com/go/go$GO_VERSION.$OS-$ARCH.tar.gz \ | ||
&& tar -C /usr/local -xzvf go$GO_VERSION.$OS-$ARCH.tar.gz \ | ||
&& rm go$GO_VERSION.$OS-$ARCH.tar.gz \ | ||
&& echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc \ | ||
&& source ~/.bashrc \ | ||
&& echo "/usr/local/go/bin" >> $GITHUB_PATH \ | ||
&& echo "Installing Singularity..." \ | ||
&& wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-ce-${SINGULARITY_VERSION}.tar.gz \ | ||
&& tar -xzf singularity-ce-${SINGULARITY_VERSION}.tar.gz \ | ||
&& cd singularity-ce-${SINGULARITY_VERSION} \ | ||
&& ./mconfig \ | ||
&& make -C builddir \ | ||
&& make -C builddir install | ||
|
||
RUN echo "Installing python system dependencies..." | ||
RUN apt-get update && apt-get install -y \ | ||
python3 \ | ||
python3-pip | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY . /app | ||
|
||
RUN echo "Installing python content..." | ||
RUN pip install --upgrade pip \ | ||
&& pip install -U "ray[default]" \ | ||
&& ./scripts/install-smoldyn-mac-silicon.sh | ||
# Install Python 3.9, pip, Python development package, and other dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
# software-properties-common \ | ||
# && add-apt-repository -y ppa:deadsnakes/ppa \ | ||
# && apt-get update \ | ||
# && apt-get install -y \ | ||
# python3.9 \ | ||
# python3.9-distutils \ | ||
# python3.9-venv \ | ||
# python3.9-dev \ | ||
python3 \ | ||
python3-pip \ | ||
build-essential \ | ||
libncurses5 \ | ||
cmake \ | ||
gcc \ | ||
swig \ | ||
pkg-config \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Update alternatives to use Python 3.9 | ||
# RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 \ | ||
# && update-alternatives --set python3 /usr/bin/python3.9 | ||
|
||
# Install pip for Python 3.9 | ||
RUN apt-get update && apt-get install -y python3-pip | ||
|
||
# Install Poetry | ||
RUN python3 -m pip install poetry | ||
|
||
# Avoid creating virtual environments as Docker provides isolation | ||
RUN poetry config virtualenvs.create false | ||
|
||
RUN poetry run pip install smoldyn | ||
|
||
RUN echo "Entering..." | ||
ENTRYPOINT ["/bin/bash"] | ||
# Install project dependencies using Poetry | ||
RUN poetry install | ||
|
||
ENV DEBIAN_FRONTEND=interactive | ||
|
||
# ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"] | ||
ENTRYPOINT ["poetry", "run", "jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Pysces] | ||
model_dir = /Pysces/psc | ||
output_dir = /Pysces | ||
change_dir_on_start = False | ||
silentstart = True | ||
matplotlib_backend = native |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
displayLogFilename=$(mktemp /tmp/display.XXXXXX.log) | ||
exec 6>${displayLogFilename} | ||
set -e | ||
Xvfb -displayfd 6 -ac -screen 0 "$XVFB_RES" -nolisten tcp $XVFB_ARGS & | ||
XVFB_PROC=$! | ||
sleep 1 | ||
export DISPLAY=":`cat ${displayLogFilename}`" | ||
set +e | ||
"$@" | ||
result=$? | ||
kill $XVFB_PROC || true | ||
exec 6>&- | ||
rm ${displayLogFilename} | ||
exit $result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Use the latest Ubuntu image as the base | ||
FROM ubuntu:latest | ||
|
||
WORKDIR /app | ||
|
||
COPY . /app | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
python3.9 \ | ||
python3-pip \ | ||
build-essential \ | ||
cmake \ | ||
gcc \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
################################### | ||
# setup headless for NEURON, Smoldyn | ||
# RUN apt-get -y update \ | ||
# \ | ||
# && apt-get install --no-install-recommends -y \ | ||
# xvfb \ | ||
# && mkdir /tmp/.X11-unix \ | ||
# && chmod 1777 /tmp/.X11-unix \ | ||
# \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
# | ||
# ENV XVFB_RES="1920x1080x24" \ | ||
# XVFB_ARGS="" | ||
|
||
RUN pip3 install poetry | ||
|
||
RUN poetry run pip install --upgrade pip \ | ||
&& poetry run pip install smoldyn \ | ||
&& poetry install # --no-dev | ||
|
||
ENTRYPOINT ["poetry", "run", "jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
pkg="$1" | ||
|
||
pip install "${pkg}" | ||
pip show "${pkg}" | ||
|
Oops, something went wrong.