engineer-man / piston

A high performance general purpose code execution engine.
https://emkc.org/run
MIT License
1.94k stars 248 forks source link

Support for Installing Additional Libraries for ML Code Evaluation #667

Open girishgl opened 6 months ago

girishgl commented 6 months ago

Hi,

We would like to use Piston for evaluating ML code, which necessitates the installation of additional libraries such as XGBoost and TensorFlow. Is there a way to install these libraries within Piston?

Currently, we are using:

{"language": "python", "version": "3.9.4"}

Thank you for your assistance.

Regards,
Girish

lcfyhr commented 6 months ago

Would love to know this as well!

ashwini-singh-repo commented 6 months ago

I am also looking to use piston for AI/ML work. Please update if any solution is available to install custom libraries in Python.

jackrankin commented 5 months ago

I also want to know how to install pytorch!

diversity-co-uk commented 5 months ago

Not clean, but functional, assuming you are using the python 3.12.0 package in a local docker install:

docker exec -it piston_api /piston/packages/python/3.12.0/bin/pip3 install WHATEVER

Otherwise make a new package with the correct pip packages installed.

By design, it seems appropriate to avoid pip installs from user code.