Skip to content

Commit

Permalink
Added script installation for docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioSanch3z committed Jun 28, 2024
1 parent 165de02 commit c6aa461
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 203 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Download base image ubuntu 18.04
#Download base image ubuntu 22.04
FROM ubuntu:22.04

# Set root user
Expand All @@ -7,6 +7,7 @@ USER root
# Update Ubuntu Software repository and install python, jupyter lab and git
RUN apt-get update && \
apt-get install -y \
sshpass \
curl \
python3 \
python3-pip \
Expand Down Expand Up @@ -34,9 +35,8 @@ USER jupyteruser
WORKDIR /home/jupyteruser

# Clone git, install, get the examples and clear files
#RUN git clone https://github.com/grycap/apricotlab.git && cd /home/jupyteruser/apricot
#\
# && sh install.sh && cd /home/jupyteruser && cp -r apricot/examples . && mv apricot .apricot_git
RUN git clone https://github.com/grycap/apricotlab.git && cd apricotlab && \
sh install.sh && cd .. && cp -r apricotlab/examples . && mv apricotlab .apricot_git

# Set entry point
ENTRYPOINT ["/bin/jupyter-apricot"]
184 changes: 0 additions & 184 deletions apricot-tutorial.ipynb

This file was deleted.

32 changes: 32 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

#!/bin/bash

#Create IM Client YAML template file (just in case)
mkdir -p $HOME/.imclient/templates

#Install and enable plugin content
if jupyter pip install apricot; then
echo -e "Plugin installed."

else

echo -e "Plugin installation failed!"
exit 2
fi

if jupyter nbextension enable apricot_plugin/main; then
echo -e "Plugin enabled."

else

echo -e "Fail enabling plugin!"
fi

#Install apricot magics (python3)
if python3 -m pip install --find-links=file:apricot_magic/ apricot_magic/; then

echo -e "magics succesfuly installed"

else
echo -e "Unable to install apricot magics with python3"
fi
Loading

0 comments on commit c6aa461

Please sign in to comment.