ChemCoScientist depends on several services: ChromaDB, embedding and reranker services, MinIO (S3), AutoML, and generative models. Each runs in its own separate Docker container.
-
ChromaDB, reranker service, embedding service:
- Clone/update the repository (use
/home/chem-paper-assistant/location on the server) - Run
cd infrastructure/chroma - Run
docker compose up
- Clone/update the repository (use
-
AutoML
-
cd infrastructure/automl
-
path/to/python3.10.exe -m venv env
-
pip install -r requirements.txt
-
source env/Scripts/activate
-
python automl_api.py
-
In automl_api.py script you should set port where you want to run server.
-
-
Generative models
-
Instructions for build and run container with generative models
The easiest way to work with this part of the project is to build a container on a server with an available video card.
git clone https://github.com/ITMO-NSS-team/MADD.gitYou need to specify the required parameters in the DockerFile, such as:
GEN_APP_PORT (the port on which you plan to deploy the container with generative models), ML_MODEL_URL (The address (IP and port) where you plan to host the server with predictive models), HF_TOK (for downloading trained models), GITHUB_TOKEN (for the ability to make commits to the code).cd infrastructure/generative_models docker build -t generative_model_backend . -
Running a container
The container may take quite a long time to build, since the environment for its operation requires a long installation and time. However, this is done quite simply.
Next, after you have created an image on your server (or locally), you need to run the container with the command:
docker run --name molecule_generator --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=<your device ID> -it --init generative_model_backend:latest bash OR docker run --name molecule_generator --runtime=nvidia -e --gpus all -it --init generative_model_backend:latest bashThe container should automatically launch a server with the FastAPI and generative models. However, if this doesn't happen, you should manually run the code
bash /projects/MADD/infrastructure/generative_models/api.sh
-
-
ChemCoScientist app:
- Clone/update the repository (use
/home/chem-paper-assistant/location on the server) - Create a
config.envfile in the root of the project based on example_config.env - Adjust the path to the volume if necessary in docker-compose.yml
- Run
cd docker - Run
docker compose up
- Clone/update the repository (use