chaidiscovery / chai-lab

Chai-1, SOTA model for biomolecular structure prediction
https://www.chaidiscovery.com
Other
1.04k stars 131 forks source link

Provide a way to control where weights are saved #51

Open arogozhnikov opened 1 week ago

arogozhnikov commented 1 week ago

Currently we store model weights in two places (one is /downloads, second esm location defined by huggingface).

It would be nice to provide some envvar (or some other mean) so that users could explicitly set where the model is saved.

Motivating example was provided by @dionjwa in #21 where weights are re-downloaded in docker container on every container restart.

It could also help with cases like #29

dionjwa commented 1 week ago

👍 agree being able to set an env var where the models are saved would be ideal

arogozhnikov commented 6 days ago

Hey @dionjwa I've just merged #61, so you could control path by setting envvar CHAI_DOWNLOADS_DIR

Examples:

CHAI_DOWNLOADS_DIR=/downloads python ./examples/predict_structure.py 

For docker, one can set envvar in dockerfile (using ENV), or with -e flag in docker run -e ...