irfpy.aspera
pre-lease version on Docker¶
The pre-release version of the Dockerfile is at https://irfpy.irf.se/projects/aspera/Dockerfile.pre
Create an image¶
To create an image, you can use the command
docker build -t irfpy/aspera-pre https://irfpy.irf.se/projects/aspera/Dockerfile.pre
Running ipython¶
To run the container, you may need to optimize some parameters.
data_location
: The location where irfpy dataset is stored.local_work_directory
: The local working directory.
docker run -it \
-v <data_location>:/Volumes/scidata/data \
-v <local_work_directory>:/notebooks
irfpy/aspera-pre \
ipython
For example, you may use
docker run -it --rm \
-v /Volumes/scidata256/data:/Volumes/scidata/data \
-v $(pwd):/notebooks \
irfpy/aspera-pre \
ipython
Then ipython is launched.
In [1]: import irfpy.aspera
In [2]: print(irfpy.aspera.__version__)
4.3.15a1
Running Jupyter Notebook¶
To run the Jupyter notebook, one should also specify the local port to be opened.
local_port: The listen port for Jupyter.
docker run --rm -it \
-p <local_port>:8888 \
-v <data_location>:/Volumes/scidata/data \
-v <local_work_directory>:/notebooks irfpy/aspera-pre \
bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/notebooks --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
For example,
docker run --rm -it \
-p 8888:8888 \
-v /Volumes/scidata256/data:/Volumes/scidata/data \
-v $(pwd):/notebooks irfpy/aspera-pre \
bash -c "/opt/conda/bin/jupyter notebook --notebook-dir=/notebooks --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
Then, you can connect to the localhost with the specified local port: http://127.0.0.1:8888/?token=6a39e5adb9c49093cf589015af14a36e102ad81cf62f98ad Note that the token changes every time.