Commit 18d1c0e6 authored by Sandor Brockhauser's avatar Sandor Brockhauser
Browse files

Merge branch 'markus-link-pyarpes-with-north' into 'develop'

Pyarpes container final touches

See merge request !40
parents 40c722e4 ceaaac1d
Pipeline #116152 passed with stages
in 1 minute and 6 seconds
#!/usr/bin/with-contentenv bash
chown -R abc:abc /pyarpes
\ No newline at end of file
#!/usr/bin/with-contentenv bash
# Add the command to run an app on startup
echo "/pyarpes/miniconda3/bin/conda run -n arpes jupyter lab $CWD" > /config/.config/openbox/autostart
\ No newline at end of file
echo "/pyarpes/miniconda3/bin/conda run -n arpes jupyter lab $RUNDIR" > /config/.config/openbox/autostart
FROM linuxserver/webtop:amd64-ubuntu-openbox-version-e1079163
RUN apt update \
&& apt install git:amd64=1:2.25.1-1ubuntu3 -y
# Helps install miniconda in the directory we have ownership over
ENV HOME=/pyarpes
# Install Miniconda
RUN curl https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh --output miniconda-install.sh \
&& apt install git:amd64=1:2.25.1-1ubuntu3 -y \
&& export HOME=/pyarpes \
&& curl https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh --output miniconda-install.sh \
&& chmod +x miniconda-install.sh \
&& bash ./miniconda-install.sh -b
# Needed to be set to run conda in the Dockerfile
ENV PATH=/pyarpes/miniconda3/bin:$PATH
RUN git clone https://github.com/Tommaso-Pincelli/arpes /pyarpes/arpes
WORKDIR /pyarpes/arpes
RUN git checkout 792a26dc0f335e2e310968d59750311b91209218
RUN conda env create -f environment.yml
# Make RUN commands use the new environment:
SHELL ["conda", "run", "--no-capture-output", "-n", "arpes", "/bin/bash", "-c"]
RUN pip install .
RUN conda install -c conda-forge jupyterlab
COPY 01-chown-dir /config/custom-cont-init.d/01-chown-dir
&& bash ./miniconda-install.sh -b \
&& chown -R 1000:1000 /pyarpes/miniconda3/bin \
&& export PATH=/pyarpes/miniconda3/bin:$PATH \
&& git clone https://github.com/Tommaso-Pincelli/arpes /pyarpes/arpes \
&& cd /pyarpes/arpes \
&& git checkout be27050716f9e306b99f6e6b416f82bfb071c8b4 \
&& conda env create -f environment.yml \
&& conda run --no-capture-output -n arpes pip install . \
&& conda run --no-capture-output -n arpes conda install -c conda-forge jupyterlab \
&& chown -R 1000:1000 /pyarpes
ENV PUID=1000 PGID=1000
COPY 02-exec-cmd /config/custom-cont-init.d/02-exec-cmd
COPY pyARPES_download_and_visualize.ipynb /pyarpes/example/pyARPES_download_and_visualize.ipynb
WORKDIR /pyarpes/example
\ No newline at end of file
......@@ -59,6 +59,11 @@ all_tools: List[ToolModel] = [
description='Run paraprobe on atom probe data',
docker_image='TODO'
),
ToolModel(
name='pyarpes',
description='Run pyARPES to analyze data',
docker_image='TODO'
),
ToolModel(
name='pyarpes',
description='Run pyARPES to analyze data',
......
......@@ -58,7 +58,7 @@ def get_docker_client() -> DockerClient:
# Placeholder code for something that retains information of what container channel are available
# Todo: Add channel number tag to the docker container created and use that as a store
available_channel = deque(['0', '1', '2', '3', '4', '5', '6'])
available_channel = deque(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
def get_available_channel() -> str:
......@@ -161,7 +161,7 @@ async def post_instances(request: Request, instance: InstanceModel, token=Depend
ports={"3000": int(f'1000{channel}')},
detach=True,
name=container_name,
environment={"SUBFOLDER": str(path), "PUID": 1000, "PGID": 1000},
environment={"SUBFOLDER": str(path), "PUID": 1000, "PGID": 1000, "RUNDIR": "/home/jovyan/work/raw"},
labels={"path": path, "channel_token": channel_token},
mounts=get_docker_mounts_from_paths(instance.paths)
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment