Git Product home page Git Product logo

astroplasma-server's Introduction

Cloudy Batch Downloader

GitHub repo size | GitHub repo file count

|

This repository is used to download the batch files for astro plasma datasets: Emission spectrum and Ionization.

Screenshots

Home Page

Plasma Ionization Interpolation

Plasma Emission Spectrum

Setup

  1. Clone the repository

    git clone [email protected]:tbhaxor/CloudyPlasmaServer.git
  2. Create and source a virtual environment (recommonded, but optional)

    virtualenv .venv
    source .venv/bin/activate
  3. Upgrade pip and install dependencies

    pip install -U pip
    pip install -r requirements.txt

    Note If you are maintaining or into development of this repository, please consider using poetry.

  4. Provide environment file

    cat <<EOF > .env
    IONIZATION_DATASET_DIR='/path/to/directory/containing/ionization-batches'
    EMISSION_DATASET_DIR='/path/to/directory/containing/emission-batches'
    EOF
  5. Migrate the database

    python manage.py migrate

Getting started

Once you have performed the steps from the Setup, you are good to go

python manage.py runserver

This will open the 8000 port by default, but you can change it using the following command

python manage.py runserver 127.0.0.1:<PORT>

Replace the placeholder <PORT> with the port number of your choice.

Using Docker Container

Get rid of all the hassle of setup and getting started. You can use the following

Requirements Docker runtime installed on your system

  1. Pull the image

    docker pull ghcr.io/tbhaxor/astro-data:latest
  2. Run the docker container with appropriate container. This will iniitally create a container and start it

    docker run -d -p 5000:5000 \
    -e EMISSION_DATASET_DIR=/data/emission-data -e IONIZATION_DATASET_DIR=/data/ionization-data \
    -v /path/of/emission/batches:/data/emission-data:ro -v /path/of/ionization/batches:/data/ionization-data:ro \
    --name astro-data ghcr.io/tbhaxor/astro-data:latest

    Note Replace the /path/* placeholder with the actual path of emission and ionization data on your host system.

    This will start the server on the http://localhost:5000, you can open this url in the browser to interact with the server.

  3. Stop and restart the server

    # stop the container
    docker stop astro-data
    
    # restart the container
    docker start astro-data

Note On updates, all you need to do is follow docker setup from step 1. Make sure you delete the container (docker rm -f astro-data) before moving forward.

astroplasma-server's People

Contributors

tbhaxor avatar manjumjn avatar pre-commit-ci[bot] avatar dutta-alankar avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.