Giter Site home page Giter Site logo

octopus-aiida-plugin's Introduction

Test Project for Developing an AIIDA Plugin for Octopus

Developing in Docker

The main dockerfile uses AIIDA's docker image as the base layer:

docker pull aiidateam/aiida-core-with-services:latest

which automatically sets up the postgres database. One can check the docker logs or run verdi status to get the status of the services. AIIDA has some documentation on developing in docker [here](https://aiida.readthedocs.io/projects/aiida-core/en/latest/intro/run_docker.html.

Installing the oct_plugin Project and Running the Plugin

Developing a basic plugin is documented here After initialising the container:

# Install the plugin
cd /oct_plugin
pip install -e .
# Run the job
cd job
# Run the test manually
octopus
# Run via verdi
verdi run launch.py

For more examples, see the [AIIDA plugin repository](https://github.com/PSDI-Biomolecular-team/aiida-gromacs/tree/master/aiida_gromacs, and various plugins - for example GROMACS.

(Attempting) to Building a Dockerfile from Scratch

Rather than use aiidateam/aiida-core-with-services base image, one can attempt to build their own dockefile. This has been explored in dockerfiles/Dockerfile, however I did not complete the file.

Configuring with Pycharm:

  • Port 5432:5432
  • Host mapping /Users/alexanderbuccheri/Codes/oct_plugin/pg_data:/var/lib/postgresql/data

This should all go into the dockerfile:

locale-gen

ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV LC_MESSAGES=POSIX

Setting up the Database

# Need to ensure the service starts.
service postgresql start
# Switch to `postgres` superuser
su -l postgres
# Create user, then database
psql -c "CREATE USER aiida WITH PASSWORD 'null';"
# Can't get the LC to be picked up, so I've dropped it when creating the database
# # CREATE DATABASE aiidadb OWNER aiida ENCODING 'UTF8' LC_COLLATE='en_US.UTF-8' LC_CTYPE='en_US.UTF-8' TEMPLATE=template0;
 psql -c "CREATE DATABASE aiidadb OWNER aiida ENCODING 'UTF8' TEMPLATE=template0;"
 psql -c "GRANT ALL PRIVILEGES ON DATABASE aiidadb to aiida;"
# Test the database having exited `postgres` superuser: 
psql -h localhost -d aiidadb -U aiida -W

Some additional commands worth noting:

# Delete Database
 psql -c "DROP DATABASE aiidadb;"
# Delete user
 psql -c "DROP USER aiida;"

Activate venv

Get the dockerfile to switch to a venv:

source /.virtualenvs/aiida/bin/activate

Set up Verdi

verdi quicksetup

Configuration details:

octopus-aiida-plugin's People

Watchers

 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.