|
| 1 | +--- |
| 2 | +id: running-locally |
| 3 | +title: Running it locally |
| 4 | +--- |
| 5 | + |
| 6 | +If you want to run SimWrapper on your own server or laptop, there are a few ways to do so. |
| 7 | + |
| 8 | +### Install from uv/pip |
| 9 | + |
| 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. |
| 11 | + |
| 12 | +**Shortest path to a running local installation:** |
| 13 | + |
| 14 | +- Install the [uv software manager](https://docs.astral.sh/uv/getting-started/installation/) which is the most modern Python packaging ecosystem out there. |
| 15 | + It is far, far faster and more error-proof than using pip or other methods. |
| 16 | +- Run `uv tool install simwrapper` to install simwrapper as a command-line program on your system. |
| 17 | + Read the output from the install command; you might need to edit your PATH to include the program. |
| 18 | +- Now go to the folder containing the data you want to explore, and run `uv tool run simwrapper` |
| 19 | +- That's it! Your site is running at http://localhost:4999 |
| 20 | + |
| 21 | +You can upgrade with `uv tool upgrade simwrapper` |
| 22 | + |
| 23 | +**pip** |
| 24 | + |
| 25 | +You can also use pip directly, with `pip install simwrapper`. If you go this route, you should |
| 26 | +probably create a virtualenv (venv) and make sure you have a recent version of Python. These extra |
| 27 | +steps can be a real pain, especially because the tool has many datascience dependencies which are |
| 28 | +difficult to install. Please use `uv` instead, as above :-) |
| 29 | + |
| 30 | + |
| 31 | +### Use Docker |
| 32 | + |
| 33 | +SimWrapper is available as a built Docker image at https://hub.docker.com/r/simwrapper/app |
| 34 | + |
| 35 | +Let's assume you already know how to use Docker if you are reading this! |
| 36 | + |
| 37 | +- `docker pull simwrapper/app` |
| 38 | +- `docker run -p 4999:4999 -v /my/data/folder:/data simwrapper/app` |
| 39 | + |
| 40 | +The `-p` tells docker to listen on port 4999; `-v` links your local folder of files to `/data` in |
| 41 | +the container image, where simwrapper will then be able to access them. |
| 42 | + |
| 43 | + |
| 44 | +### Build the site yourself |
| 45 | + |
| 46 | +Please read the [developer's guide](dev-guide) for full instructions on how to build and run the |
| 47 | +site locally. |
| 48 | + |
| 49 | +This should only be necessary if you want to file/fix bugs or add special features for your own |
| 50 | +instance. PR's gladly accepted! |
| 51 | + |
0 commit comments