Clone the project
git clone https://github.com/mlco2/codecarbon/codecarbon.gitPrepare configuration:
cd codecarbon
cp docker/docker.env .envdocker-compose up -dThis will run :
- Postgresql on localhost:5480
- PGAdmin 4 on http://localhost:5080 login : test@test.com , 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 downPostgres database and PGAdmin configuration are saved in separate volumes.
docker logs codecarbon-api_codecarbon_api_1docker exec codecarbon-api_codecarbon_api_1 hatch run api:test-integtoxdocker-compose up --buildDelete all files :
docker-compose down -v
docker image rm codecarbon-api