Depending on your operating system, you should set up your envirnoment to meet the following requirements:
- For Windows, please work from WSL 2.1.5 or higher, and set up Docker Desktop according to these instructions.
- For a Linux distribution, you may use a regular terminal. Set up Docker Engine or Docker Desktop, as well.
- For macOS, you should also be able to use a regular terminal. Make sure to install Docker Desktop.
Check that Git is installed on your device.
☝️ If you are using Docker Desktop, make sure it is running on your device before using the commands below in your terminal.
With these requirements met, you can get started from a Linux, macOS or WSL terminal:
# Ensure that you have the Docker installed
docker -v
docker compose version
# Clone the repository
git clone https://github.com/ai4mde/studio.git
cd studioBefore the environment can be built, you need to provide your secret LLM API key (e.g. OpenAI) in a new file /config/secrets.env using the Groq LLM API manager. An example of such a file can be seen in /config/secrets.env.example. You have to perform this step in order to run the software, however you may leave the values empty if you are not interested in using the LLM features. Feel free to use the terminal or any code/text editor for editing the file.
☝️ Also, take note of the username and password stored in files
config/api.envandconfig/prototypes.env. These are your credentials for logging into AI4MDE, and any potential web application prototypes you might generate with it, respectively:DJANGO_SUPERUSER_USERNAME = adminandDJANGO_SUPERUSER_PASSWORD = sequoias. You may update your credentials in these files if you wish.
# Configure secrets (required file; values optional if you won't use LLM features)
cp config/secrets.env.example config/secrets.env
# edit config/secrets.env
# edit config/api.env
# edit config/prototypes.env
# Build and Start all the containers (add -d flag to start in background)
docker compose up -d --build
# To stop the containers, you can use
docker compose downThis will start multiple services in the background and set everything up (for development). As soon as that's done, you can find the following services on your machine's network:
- ai4mde.localhost - Frontend, from
/frontend. As a non-contributing user, this is where you can interact with the AI4MDE tool. Use the credentials fromconfig/api.envto log in. - api.ai4mde.localhost - API from
/api. - prototype.ai4mde.localhost - Running prototype in
/prototypes/generated_prototypes. - prototypes_api.ai4mde.localhost - Prototype management API from
/prototypes/backend.