|
1 | 1 | --- |
2 | 2 | id: running-locally |
3 | | -title: Running it locally |
| 3 | +title: Running locally/offline |
4 | 4 | --- |
5 | 5 |
|
6 | | -If you want to run SimWrapper on your own server or laptop, there are a few ways to do so. |
| 6 | +Most users can use simwrapper directly from the website https://simwrapper.app. But many are interested in running a local copy of the site on their own machine, perhaps inside an agency network firewall or in "offline mode" without requiring network access. |
| 7 | + |
| 8 | +If you want to run SimWrapper locally on your own server or laptop, there are a few ways to do so. Once it is installed, it will be available "offline" as well. |
7 | 9 |
|
8 | 10 | ### Install from uv/pip |
9 | 11 |
|
10 | | -This is the easiest solution for most of you. SimWrapper is a website, but for ease of of local installation we've also packaged it up as a super simple 'simwrapper' command-line package on the PyPi software repository. You don't need to know Python to use this package. |
| 12 | +This is the easiest solution for most situations. SimWrapper has been packaged as a self-contained command line tool on the PyPi software repository. You don't need to know or use Python to use this package. |
11 | 13 |
|
12 | 14 | **Shortest path to a running local installation:** |
13 | 15 |
|
14 | | -Use the [uv software manager](https://docs.astral.sh/uv/) which is the most modern Python packaging ecosystem out there. uv eliminates the problems with virtual environments, messy multiple python versions, etc. It is far, far faster and more error-proof than using pip or other methods. |
| 16 | +Use the [uv software manager](https://docs.astral.sh/uv/). uv is the modern replacement for all previous python software management tools like pip, poetry, virtualenv, etc. It eliminates the problems with virtual environments, messy multiple Python versions, etc. It is far, far faster and more error-proof than using pip or other methods! |
15 | 17 | - Install uv first if you don't already have it: |
16 | 18 | https://docs.astral.sh/uv/getting-started/installation |
17 | | -- Run `uv tool install simwrapper` to install simwrapper as a command-line program on your system. |
18 | | - Read the output from the install command; you might need to edit your PATH to include the program. |
19 | | -- Now go to the folder containing the data you want to explore, and run `uv tool run simwrapper` |
20 | | -- That's it! Your site is running at http://localhost:4999 |
| 19 | +- Go to the folder containing the data you want to explore, and run |
| 20 | + - `uvx simwrapper run` |
| 21 | +- There's no step 3! SimWrapper is now running at http://127.0.0.1:4999 or http://localhost:4999 |
21 | 22 |
|
22 | | -You can upgrade with `uv tool upgrade simwrapper` |
| 23 | +`uvx` is a combined installer/command runner that will auto install the simwrapper tool from https://pypi.org/project/simwrapper/ on first run. Each time it runs, it will check for the latest version and update automatically. In offline mode it runs the most recent version that it has already installed. |
| 24 | +- Read the [uv docs](https://docs.astral.sh/uv/) for many other uv capabilities such as `uv tool install simwrapper` and managing your pip dependencies and python versions! |
23 | 25 |
|
24 | 26 | **pip** |
25 | 27 |
|
26 | 28 | You can also use pip directly, with `pip install simwrapper`. If you go this route, you should |
27 | 29 | probably create a virtualenv (venv) and make sure you have a recent version of Python. These extra |
28 | | -steps can be a real pain, especially because the tool has many datascience dependencies which are |
| 30 | +steps can be a real pain, especially because SimWrapper has many data science dependencies which are |
29 | 31 | difficult to install. Please use `uv` instead, as above :-) |
30 | 32 |
|
31 | 33 |
|
|
0 commit comments