microsoft / antares

Antares: an automatic engine for multi-platform kernel generation and optimization. Supporting CPU, CUDA, ROCm, DirectX12, GraphCore, SYCL for CPU/GPU, OpenCL for AMD/NVIDIA, Android CPU/GPU backends.
Other
449 stars 47 forks source link

Change the cache directory #350

Closed LeiWang1999 closed 2 years ago

LeiWang1999 commented 2 years ago

I'm currently working in my docker container, now I wanna to commit the docker container to an image, but I found that the cache of the antares' database is located in home directory, any environment can change the default storage path?

image
ghostplant commented 2 years ago

Does soft link help on your requirement?

LeiWang1999 commented 2 years ago

I think it can help, but any other solution? for example, just export TORCH_HOME=/path/to/store/ then pytorch model will stored in a specified directory.

ghostplant commented 2 years ago

If you use antares's native docker support, there should be a soft link to {ANTARES_ROOT}/.libAntares,which allows the codehub data to be persistantly stored in host side.

Another choice is setting export ANTARES_DRIVER_PATH=<your personal path>, the codehub location inside docker container will be redirected to {ANTARES_DRIVER_PATH}/codehub.

LeiWang1999 commented 2 years ago

Thanks @ghostplant