This repository contains the source code of the Skeletal Cell Atlas App, written in Python using the Dash framework. The app is currently running at skeletalcellatlas.org.
You can grab your own copy of the dataset from the address above (as a loom file), put it in the data
directory, and follow one of the following approaches (run with or without Docker) to install and run a local version of the app on your machine.
For more information on the dataset and the app, please refer to this preprint.
A docker-compose.yaml
is provided to simplify building and running the
container for local testing.
Run the following command to build the image:
docker-compose build
To run the application simply type:
docker-compose up
The app can be accessed at http://localhost:8050.
The files folder of the project is automatically mounted in the container
as data folder at /app/data
.
Following command will open a bash shell in the running app container:
docker-compose exec app bash
The shell will opened in the directory where the application is installed.
Following command will launch the app container with an interactive bash shell:
docker-compose run --service-ports app bash
The option --service-ports
is needed to publish service ports specified
in the docker-compose.yaml
file to the host computer.
Configuration of the app is done by passing environment variables to the running container. Following environment variables are used:
DATA_PATH
: location of the data files (default:/app/data
)SERVER_PORT
: The port on which the app is exposed (default: 8050)UPLOAD_PASSWORD
: Password for data upload
Note: If the app is launched directly in a shell (see next section), i.e.
not within a container, the environment variables can be set in a .env
file in the root folder of the project.
Install all requirements:
pip install -r requirements.txt
Create .env
file defining the environment variable DATA_PATH
to point
to the location of the data files, e.g.:
echo DATA_PATH=files > .env
Launch the app like this:
python -m app.main
The app can be accessed at http://localhost:8050.
If you faced a problem regarding the host name, you may explicitly define the address in the last statement of the app/main.py
file. For example, you can change it from:
app.run_server(debug=True, port=settings.get('SERVER_PORT'))
to:
app.run_server(host='127.0.0.1', debug=True, port=settings.get('SERVER_PORT'))
in order to access the app at http://127.0.0.1:8050