caMicroscope Development Environment : Contributor’s Guide

Gautam Mishra
2 min readMar 29, 2020

--

caMicroscope is an open-source a web-based Annotation and Visualization Platform for digitized Whole Slide Images. It is largely optimized for large biomedical image data viewing, with a strong emphasis on cancer pathology. You can find their repository here.

(Source: https://github.com/camicroscope/caMicroscope)

caMicroscope can use used as a standalone application (See here) or It can be deployed as a part of the stack by using Distro. Where you can deploy it using docker.

caMicroscope is new and fast-growing software it is attracting many new contributors. This blog aims at helping them set-up the environment for development. As it is the most difficult step for any new contributor.

You have to change the built steps in the caMicroscope.yml file in the Distro to see the changes.

git clone https://github.com/camicroscope/caMicroscope.git
git clone https://github.com/camicroscope/Distro.git
git clone https://github.com/camicroscope/Caracal.git

Make the desired changes into the caMicroscope directory.

Now, you have to change the built steps in the caMicroscope.yml file in Distro. Go to the Distro directory and find develop.yml file and find the following part.

Make the following changes.

  1. Change the contex to the fork of yor local Caracal
  2. Mount the cloned caMicroscope directory as a volume.
back:
build:
context: "../Caracal"
args:
viewer: "develop"
depends_on:
- "mongo"
ports:
- "4010:4010"
container_name: ca-back
volumes:
- ./config/login.html:/root/src/static/login.html
- ./jwt_keys/:/root/src/keys/
- ../caMicroscope:/root/src/camicroscope

After that go to the Dockerfile in Caracal repository and delete the line which runs the git clone. It is no more needed as we have our own clone of the repository with us.

FROM node:12-alpine
RUN apk add git
RUN mkdir /root/src
RUN npm install -g forever
COPY . /root/src
WORKDIR /root/src
RUN npm install
ARG viewer
RUN if [ -z ${viewer} ]; then git clone https://github.com/camicroscope/camicroscope.git; else git clone https://github.com/camicroscope/camicroscope.git --branch=$viewer; fi
EXPOSE 8010
CMD forever caracal.js

Run the following command to build all the services.

docker-compose -f caMicroscope.yml build back
docker-compose -f caMicroscope.yml up

Now you will see the live changes happening in the server.

Note: If you don’t have the docker-compose installed, make sure to install it first.

Work on frontend

If you want to work on the frontend there is not much to do. You can simply start the install “live Server” plugin on VSCode and serve the file in which you are currently working.

Thank You for reading.

--

--

No responses yet