Any way to install frappe-bench locally

Data is very expensive in my country, South Africa. When I run “bench init frappe-bench” it tends to fail because of missing node modules or some other missing resource. I’m happy to fix these but it means the process downloads some 200Mb of files each time. Not a lot the first time, but if I’m running the process for the 10th time, it not only is expensive but also wastes time. Is there any way to just download the entire thing once and run the install from that? Or could you adapt your install script to not clone the files again unless they’ve changed but simply pick up from afterwards? That would be great! Otherwise, ERPNext is fantastic!

“bench init --frappe-branch master frappe-bench
Directory frappe-bench already exists!”

You don’t need to create a new bench every time. Once your apps are cloned, you can run

bench setup requirements
bench setup redis
bench setup procfile
bench build

You can also individually install the cloned app in the created env

env/bin/pip install -e apps/frappe

Check this: bench/utils.py at master · frappe/bench · GitHub

1 Like

Awesome, I’ll give it a shot. Thanks for the info. Still lots to learn but very exciting.

@rmehta - Somewhat related to this. I have a pending pull request against Bench. It enables you to change the repository sources, using a config file.

My intended use cases:

  • If we ever want to leave GitHub, and move to GitLab (or whatever). Instead of updating many files and lines of code, now it’s just 1 configuration file.
  • Developers using bench can point at their own, forked repositories.

However, Kevin’s request could be resolved by this too.

  1. He would create 1 local git repository for bench, frappe, erpnext.
  2. Use the bench configuration file to “point” bench at this repository, instead of GitHub.
  3. Run all bench commands normally.
  4. Periodically, sync his local repository with our real ones on GitHub.

That would save on internet usage, with no additional bench commands needed.

1 Like