clash-linux commited on
Commit
cfbe0b3
·
verified ·
1 Parent(s): 896c163

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -44
README.md CHANGED
@@ -1,69 +1,64 @@
1
  ---
2
- title: SillyTavern (via Dockerfile)
3
- emoji: 🐳
4
  colorFrom: blue
5
- colorTo: green
6
  sdk: docker
7
  pinned: false
8
  app_port: 8000 # SillyTavern default port
9
- # Runtime secret for config.yaml
10
  secrets:
11
  - name: CONFIG_YAML
12
  description: "Contents of your config.yaml file"
13
- required: true
14
- # Build argument for plugins
15
- # Note: How to set build args might vary in HF UI.
16
- # Look for 'Build variables' or similar in Space settings.
17
- build:
18
- args:
19
- PLUGINS: "https://github.com/fuwei99/data-sync.git,https://github.com/fuwei99/plugin-manager.git" # Example default plugins
20
  ---
21
 
22
- # SillyTavern Docker Deployment for Hugging Face Spaces
23
 
24
- This Space runs SillyTavern using a custom `Dockerfile`. It clones the SillyTavern `staging` branch and allows dynamic installation of plugins during the build process.
25
 
26
- ## Key Features
27
-
28
- * Clones SillyTavern directly from GitHub (`staging` branch).
29
- * Dynamically installs plugins specified via a build argument.
30
- * Uses a runtime secret (`CONFIG_YAML`) to configure SillyTavern, keeping your configuration private.
31
 
32
  ## Setup and Deployment Steps
33
 
34
- 1. **Fork or Create Space:**
35
- * Create a new Hugging Face Space, selecting "Docker" as the SDK.
36
- * Alternatively, fork this repository.
37
 
38
- 2. **Add Files:**
39
- * Ensure the `Dockerfile` from this repository is present in the root of your Space.
40
- * This `README.md` provides basic instructions.
 
 
 
41
 
42
- 3. **Configure `CONFIG_YAML` Secret:**
43
  * Go to your Space's **Settings** tab on Hugging Face.
44
  * Navigate to the **Secrets** section.
45
- * Click **New secret**.
46
- * Enter the name exactly as `CONFIG_YAML`.
47
- * Paste the **entire content** of your desired `config.yaml` file into the **Secret value** field. **Do not include comments in the YAML content.** (See Dockerfile `ENTRYPOINT` for how this is used).
48
- * Save the secret.
49
-
50
- 4. **(Optional) Configure `PLUGINS` Build Argument:**
51
- * This `Dockerfile` uses a build argument named `PLUGINS` to specify which plugins to install.
52
- * **How to set Build Arguments in Hugging Face Spaces:** The exact method might change, but look in your Space **Settings** for sections like "Build variables", "Docker build arguments", or similar configuration options related to the Docker build process.
53
- * You need to set the build argument `PLUGINS`.
54
- * The **value** should be a comma-separated list of the Git URLs for the plugins you want to install. Example:
55
- ```
56
- https://github.com/user1/plugin-a.git,https://github.com/user2/plugin-b.git
57
- ```
58
- * **Default:** If you don't set this build argument, the default specified in the `README.md` header metadata (`build.args.PLUGINS`) might be used, or it might default to empty depending on Hugging Face's handling. Check the Dockerfile `ARG PLUGINS=""` line for the ultimate default if none is provided elsewhere.
59
 
60
- 5. **Build and Launch:**
61
- * Commit any changes to your Space repository.
62
  * Hugging Face should automatically start building the Docker image based on the `Dockerfile`.
63
- * The build process will clone SillyTavern and any specified plugins.
64
  * Once the build is complete, the Space should launch SillyTavern.
65
 
66
- ## Accessing SillyTavern
67
 
68
  * Access the main SillyTavern interface via the public URL of your Space.
69
- * If you installed plugins with UIs (like `data-sync` or `plugin-manager`), access them via their respective paths (e.g., `/api/plugins/data-sync/ui`).
 
 
1
  ---
2
+ title: SillyTavern (Git Deploy) with Dynamic Plugins
3
+ emoji: 🚀
4
  colorFrom: blue
5
+ colorTo: purple
6
  sdk: docker
7
  pinned: false
8
  app_port: 8000 # SillyTavern default port
9
+ # Add secrets
10
  secrets:
11
  - name: CONFIG_YAML
12
  description: "Contents of your config.yaml file"
13
+ required: true # Keep config required
14
+ - name: PLUGINS
15
+ description: "Comma-separated list of Git URLs for plugins to install"
16
+ required: false # Make plugins optional
 
 
 
17
  ---
18
 
19
+ # SillyTavern with Dynamic Plugins (Git Deployment)
20
 
21
+ This Space runs SillyTavern by cloning the core repository directly from GitHub and dynamically installing plugins specified via Hugging Face Secrets.
22
 
23
+ **IMPORTANT:** This setup requires you to provide your `config.yaml` content as a Hugging Face Secret named `CONFIG_YAML`. Optionally, you can specify plugins to install via a secret named `PLUGINS`.
 
 
 
 
24
 
25
  ## Setup and Deployment Steps
26
 
27
+ 1. **Prepare `config.yaml`:**
28
+ * Ensure you have a valid `config.yaml` file for SillyTavern.
29
+ * **Remove any comments** from the file, as they might interfere with environment variable parsing.
30
 
31
+ 2. **Upload Files to Hugging Face:**
32
+ * Clone your Hugging Face Space repository locally or use the web UI.
33
+ * Add/replace the following files in the root of your Space repository:
34
+ * This `README.md` file.
35
+ * The `Dockerfile` provided in our conversation.
36
+ * Commit and push the changes. **You no longer need to upload `sillytavern.zip`.**
37
 
38
+ 3. **Configure Secrets:**
39
  * Go to your Space's **Settings** tab on Hugging Face.
40
  * Navigate to the **Secrets** section.
41
+ * **Add `CONFIG_YAML` Secret:**
42
+ * Click **New secret**.
43
+ * Enter the name exactly as `CONFIG_YAML`.
44
+ * Paste the **entire content** of your prepared (comment-free) `config.yaml` file into the **Secret value** field.
45
+ * Save the secret.
46
+ * **(Optional) Add `PLUGINS` Secret:**
47
+ * Click **New secret** again.
48
+ * Enter the name exactly as `PLUGINS`.
49
+ * Paste a **comma-separated list** of the Git URLs for the plugins you want to install into the **Secret value** field. **Ensure there are no spaces around the commas.** Example:
50
+ ```
51
+ https://github.com/fuwei99/plugin-manager.git,https://github.com/fuwei99/cloud-saves.git,https://github.com/fuwei99/data-sync.git
52
+ ```
53
+ * Save the secret. If you leave this secret empty or don't create it, no extra plugins will be installed.
 
54
 
55
+ 4. **Build and Launch:**
 
56
  * Hugging Face should automatically start building the Docker image based on the `Dockerfile`.
57
+ * The build process will clone the SillyTavern core (`staging` branch) and then clone/install dependencies for the plugins listed in the `PLUGINS` secret.
58
  * Once the build is complete, the Space should launch SillyTavern.
59
 
60
+ ## Accessing SillyTavern and Plugins
61
 
62
  * Access the main SillyTavern interface via the public URL of your Space.
63
+ * If you installed plugins, access their UIs as needed (e.g., `/api/plugins/plugin-manager/ui`, `/api/plugins/data-sync/ui`, `/api/plugins/cloud-saves/ui`). Check each plugin's documentation for its specific path.
64
+ * Remember to configure plugins like `data-sync` or `cloud-saves` within their respective UIs (repo URL, auth tokens, etc.).