To install this tool you need nodejs, docker and access to GitHub - atomicateam/atomica: Atomica.
Step 1: Clone the repo
git clone git@github.com:sciris/atomica_apps.gitStep 2: Install docker-machine and docker-compose
Instructions for docker-machine installation can be found here: Install Docker Machine | Docker Documentation. For MacOS you can use homebrew if you have it installed using brew install docker-machine.
Instruction for docker-compose installation can be found here: Install Docker Compose | Docker Documentation . For MacOS you can use homebrew if you have it installed using brew install docker-compose; on Linux, sudo apt install docker-compose.
Step 3: Build the images locally
Change to the root of the atomica_apps dir:
cd atomica_apps
To build and run cascade (NB, on Linux may need to be run as sudo):
docker-compose -f docker/docker-compose.cascade.local.yml build
docker-compose -f docker/docker-compose.cascade.local.yml up
To build and run tb:
docker-compose -f docker/docker-compose.tb.local.yml build
docker-compose -f docker/docker-compose.tb.local.yml up
Step 5: follow the instructions on the next section ("Developing the front end") to build the front end.
The front end code for tb and cascade is inside the src/ folder in the atomica_apps repo.
To install the dependencies required for front end development:
Step 1: Install Node.js on your local machine https://nodejs.org/en/download/
Step 2: Install the npm dependencies
Go to the the root of atomica_apps repo and then:
npm install
Step 3: Build or Watch
Once that’s done you can run npm run watchtb or npm run watchcascade in order to track changes and rebuild the specific app in dist/<app_name>/.
In order to build a minified copy of cascade and tb you will need to go to the static folder and run npm run build. This will create minified copies of the apps and place them in dist/<app_name>/
To test the FE without docker, follow these steps
- Install Redis https://github.com/microsoftarchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi
- Install node.js https://www.npmjs.com/get-npm
- Create a Python 3.7 Anaconda environment (
conda create -n myenv python=3.7) - Install standard packages
conda install mklandconda install numpy scipy matplotlib - Install Twisted
conda install twisted - Clone and do
python setup.py developthese repos in order:scirissciriswebsciris/mpld3(NOT the main public mpld3 release)atomicaatomica_apps
- Go into the
atomica_appsfolder and donpm installin the terminal. It should make anode_modulesfolder and download a collection of node packages - To run the FE, open a command prompt, activate your conda environment, and run each of these files
bin/server_tb.pybin/devclient_tb.pybin/worker_tb.py
On Windows you can write a .bat file with contents similar to
call C:\ProgramData\Miniconda3\Scripts\activate.bat C:\ProgramData\Miniconda3
call activate atomica37
cd /D E:\projects\atomica_apps\bin
python server_tb.py
pause
replacing the Anaconda path for activate.bat, the name of the environment, and the path to atomica_apps as required. Make one file for each of the three .py files to run.
To run the client, close all windows and run those three batch scripts.