These instructions will get you running on your local machine all exercises done at mifobio.
You need to install git
, docker ce > 17.09
and omero insight
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Choose one of the following options.
You can use Git now.
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.
Choose one of the following options.
- Instructions for Windows
- Instructions for Mac
- Instructions for Linux - CentOS
- Instructions for Linux - Debian
- Instructions for Linux - Fedora
- Instructions for Linux - Ubuntu
You can use Docker now.
OMERO.insight is a client to upload, view and download data from any personal computer.
You can download your omero client according to your operating system in this page
The next steps are done with a ubuntu 16.04 LTS.
Copy and paste these instructions on a terminal:
cd ~
git clone https://github.com/MontpellierRessourcesImagerie/jupyter-workshop-mifobio-2018.git
cd jupyter-workshop-mifobio2018
To run OMERO simply do:
docker volume create --name omero-db
docker volume create --name omero-data
docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -v omero-db:/var/lib/postgresql/data postgres
docker run -d --name omero-server --link postgres:db -e CONFIG_omero_db_user=postgres -e CONFIG_omero_db_pass=postgres -e CONFIG_omero_db_name=postgres -e ROOTPASS=omero-root-password -v omero-data:/OMERO -p 4063:4063 -p 4064:4064 openmicroscopy/omero-server:latest
docker run -d --name omero-web --link omero-server:omero -p 4080:4080 openmicroscopy/omero-web-standalone:latest
It will launch all services : PostgreSQL server, OMERO.server and OMERO.web. All data needed for postgres database are saved inside omero-db and all data needed for server are saved inside omero-data.
To connect to the server with the OMERO.web client, go to http://localhost.
Default admin credentials are root
and omero-root-password
.
To connect to the server with the OMERO Insight client use localhost
as a server address and 4064
(by default) for the port.
You can follow these instructions on this page to import image data onto the OMERO server.
The goal is to import images located inside jupyter-workshop-mifobio-2018/exercises/images/PK-10B-pl1 and jupyter-workshop-mifobio-2018/exercises/images/PK-11B-pl1 directories. For this, you can create into omero web two projects name respectively PK-10B-pl1 and PK-11B-pl1.
You can visualize an example as below onto the omero web.
To run a jupyter notebook, i use a slightly modified version of a dockerfile given by ome. To run jupyter notebook simply do:
docker volume create --name notebook
#create workshop-mifobio2018 image
docker build -t workshop-mifobio2018 .
#run workshop-mifobio2018 image
docker run -it --net host -p 8888:8888 -v notebook:/home/jovyan/mifobio_2018/exercises workshop-mifobio2018
Follow instructions on the terminal.
All update/new notebooks in exercises are will save inside notebook
docker ps
— Lists running containers. Some useful flags include:-a
/-all
for all containers (default shows just running) and—-quiet
/-q
to list just their ids (useful for when you want to get all the containers).docker pull
— Most of your images will be created on top of a base image from the Docker Hub registry. Docker Hub contains many pre-built images that you can pull and try without needing to define and configure your own. To download a particular image, or set of images (i.e., a repository), usedocker pull
.docker build
— Thedocker build
command builds Docker images from a Dockerfile and a “context”. A build’s context is the set of files located in the specified PATH or URL. Use the-t
flag to label the image, for exampledocker build -t my_container
. with the . at the end signalling to build using the currently directory.docker run
— Run a docker container based on an image, you can follow this on with other commands, such as-it bash
to then run bash from within the container. Also see Top 10 options fordocker run — a
quick reference guide for the CLI command.docker run my_image -it bash
docker logs
— Use this command to display the logs of a container, you must specify a container and can use flags, such as--follow
to follow the output in the logs of using the program.docker logs --follow my_container
docker volume ls
— This lists the volumes, which are the preferred mechanism for persisting data generated by and used by Docker containers.docker rm
— Removes one or more containers.docker rm my_container
docker rmi
— Removes one or more images.docker rmi my_image
docker stop
— Stops one or more containers.docker stop my_container
stops one container, whiledocker stop $(docker ps -a -q)
stops all running containers. A more direct way is to usedocker kill my_container
, which does not attempt to shut down the process gracefully first.