SanjinDedic / agent_games

Secure, extensible agent competition platform API build with FastAPI, SQLmodel, Pydantic and Docker
9 stars 2 forks source link

Server Status and automated pruning of unused containers #81

Closed SanjinDedic closed 1 month ago

SanjinDedic commented 2 months ago

The server ran out of space today

ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device

WARNING: There was an error checking the latest version of pip.
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
ubuntu@ip-172-31-34-244:~/agent_games$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs            95M  2.2M   93M   3% /run
/dev/xvda1      7.6G  7.5G  116M  99% /
tmpfs           475M     0  475M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/xvda15     105M  6.1M   99M   6% /boot/efi
tmpfs            95M  4.0K   95M   1% /run/user/1000
ubuntu@ip-172-31-34-244:~/agent_games$ docker image prune -a
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y
Deleted Images:

This needs to be run automatically, probably using systemctl

From my experiments each submission eats up about 100mb