Skip to content

Latest commit

 

History

History

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Usage of CodeCarbon with Docker

Prerequisites

Clone the project

git clone https://github.com/mlco2/codecarbon/codecarbon.git

Prepare configuration:

cd codecarbon
cp docker/docker.env .env

Run

docker-compose up -d

This will run :

Stop

docker-compose down

Postgres database and PGAdmin configuration are saved in separate volumes.

View logs

docker logs codecarbon-api_codecarbon_api_1

Execute tests

docker exec codecarbon-api_codecarbon_api_1 hatch run api:test-integtox

Force build

docker-compose up --build

Cleaning

Delete all files :

docker-compose down -v
docker image rm codecarbon-api