On trying to cache a venv folder for python job in shell executor, it seems slower than without caching. I am using multiple local runners. Can I use NFS for creating a shared folder and make cache path to same for speeding up? Any alternative solutions?
config.toml
[[runners]]
name = "shell_runner1"
url = "https://gitlab.abc.in/"
token = "xyz"
executor = "shell"
.gitlab-ci.yml
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
After trial and errors, I figured that NFS sharing home/gitlab-runner/.cache doesnt help in case of venv (large folder), maybe good for artifacts. Its better to not remove venv folder than adding venv to cache, jobs are faster now.
.gitlab-ci.yml