Clone the project
git clone https://github.com/mlco2/codecarbon/codecarbon.git
Prepare configuration:
cd codecarbon
cp docker/docker.env .env
docker-compose up -d
This will run :
- Postgresql on localhost:5480
- PGAdmin 4 on http://localhost:5080 login : [email protected] , password : test (Dans PGAdmin, use the host postgres_codecarbon and port 5432 for in docker network access)
- CodeCarbon API on http://localhost:8008
docker-compose down
Postgres database and PGAdmin configuration are saved in separate volumes.
docker logs codecarbon-api_codecarbon_api_1
docker exec codecarbon-api_codecarbon_api_1 hatch run api:test-integtox
docker-compose up --build
Delete all files :
docker-compose down -v
docker image rm codecarbon-api