diff --git a/.github/readme.md b/.github/readme.md index 434aeec75..f8430829f 100644 --- a/.github/readme.md +++ b/.github/readme.md @@ -196,6 +196,43 @@ For MacOS / Linux all of these will be done in a Terminal. 5. Start the install launcher with: `chmod +x install.sh && ./install.sh` and choose what you wanna install 6. After installation start the launcher with: `chmod +x launcher.sh && ./launcher.sh` +## 🐋 Installing via Docker + +These instructions assume you have installed Docker, are able to access your command line for the installation of containers, and familiar with their general operation. + +### Building the image yourself + +We have a comprehensive guide on using SillyTavern in Docker [here](http://docs.sillytavern.app/installation/docker/) which covers installations on Windows, macOS and Linux! Give it a read if you wish to build the image yourself. + +### Using the GitHub Container Registry (easiest) + +You will need two mandatory directory mappings and a port mapping to allow SillyTavern to function. In the command, replace your selections in the following places: + +#### Container Variables + +##### Volume Mappings + +- [config] - The directory where SillyTavern configuration files will be stored on your host machine +- [data] - The directory where SillyTavern user data (including characters) will be stored on your host machine +- [plugins] - (optional) The directory where SillyTavern server plugins will be stored on your host machine + +##### Port Mappings + +- [PublicPort] - The port to expose the traffic on. This is mandatory, as you will be accessing the instance from outside of its virtual machine container. DO NOT expose this to the internet without implementing a separate service for security. + +##### Additional Settings + +- [TimeZone] - The timezone your instance should use. This is useful for making logs match your local time for easier troubleshooting. Use your TZ Identifier. (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) +- [DockerNet] - The docker network that the container should be created with a connection to. If you don't know what it is, see the [official Docker documentation](https://docs.docker.com/reference/cli/docker/network/). +- [version] - On the right-hand side of this GitHub page, you'll see "Packages". Select the "sillytavern" package and you'll see the image versions. The image tag "latest" will keep you up-to-date with the current release. You can also utilize "staging" and "release" tags that point to the nightly images of the respective branches, but this may not be appropriate, if you are utilizing extensions that could be broken, and may need time to update. + +#### Install command + +1. Open your Command Line +2. Run the following command `docker create --name='sillytavern' --net='[DockerNet]' -e TZ="[TimeZone]" -p '8000:8000/tcp' -v '[plugins]':'/home/node/app/plugins':'rw' -v '[config]':'/home/node/app/config':'rw' -v '[data]':'/home/node/app/data':'rw' 'ghcr.io/sillytavern/sillytavern:[version]' ` + +> Note that 8000 is a default listening port. Don't forget to use an appropriate port if you change it in the config. + ## 📱 Mobile - Installing via termux > \[!NOTE] @@ -347,6 +384,7 @@ GNU Affero General Public License for more details.** * Korean translation by @doloroushyeonse * k_euler_a support for Horde by * Chinese translation by [@XXpE3](https://github.com/XXpE3), 中文 ISSUES 可以联系 @XXpE3 +* Docker guide by [@mrguymiah](https://github.com/mrguymiah) and [@Bronya-Rand](https://github.com/Bronya-Rand) [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 2f1f68676..1431c9d8b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,4 +10,5 @@ services: volumes: - "./config:/home/node/app/config" - "./data:/home/node/app/data" + - "./plugins:/home/node/app/plugins" restart: unless-stopped diff --git a/package-lock.json b/package-lock.json index 0d599f9ec..0aa9404ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ "express": "^4.19.2", "form-data": "^4.0.0", "google-translate-api-browser": "^3.0.1", - "gpt3-tokenizer": "^1.1.5", "he": "^1.2.0", "helmet": "^7.1.0", "ip-matching": "^2.1.2", @@ -1213,10 +1212,6 @@ "version": "1.1.1", "license": "MIT" }, - "node_modules/array-keyed-map": { - "version": "2.1.3", - "license": "ISC" - }, "node_modules/async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", @@ -2738,16 +2733,6 @@ "version": "1.1.4", "license": "MIT" }, - "node_modules/gpt3-tokenizer": { - "version": "1.1.5", - "license": "MIT", - "dependencies": { - "array-keyed-map": "^2.1.3" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", diff --git a/package.json b/package.json index 03a314006..a3bea6544 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ "express": "^4.19.2", "form-data": "^4.0.0", "google-translate-api-browser": "^3.0.1", - "gpt3-tokenizer": "^1.1.5", "he": "^1.2.0", "helmet": "^7.1.0", "ip-matching": "^2.1.2", diff --git a/public/index.html b/public/index.html index aaccc77de..d6744435a 100644 --- a/public/index.html +++ b/public/index.html @@ -1684,7 +1684,7 @@
-