engineer-man / piston

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

Support for Installing Additional Libraries for ML Code Evaluation #667

Open girishgl opened 2 months ago

girishgl commented 2 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 2 months ago

Would love to know this as well!

ashwini-singh-repo commented 2 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 1 month ago

I also want to know how to install pytorch!

diversity-co-uk commented 1 month 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.