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

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -33
README.md CHANGED
@@ -1,60 +1,69 @@
1
  ---
2
- title: SillyTavern (Zip Deploy) with Data Sync
3
- emoji: 📦 # Changed emoji to reflect zip deployment
4
- colorFrom: indigo
5
  colorTo: green
6
  sdk: docker
7
  pinned: false
8
  app_port: 8000 # SillyTavern default port
9
- # Add secret for config.yaml
10
  secrets:
11
  - name: CONFIG_YAML
12
  description: "Contents of your config.yaml file"
13
  required: true
 
 
 
 
 
 
14
  ---
15
 
16
- # SillyTavern with Data Sync Plugin (Zip Deployment)
17
 
18
- This Space runs SillyTavern using a zipped deployment method to accommodate Hugging Face file limits. It includes the custom `data-sync` plugin.
19
 
20
- **IMPORTANT:** This setup requires you to upload your SillyTavern installation (including the plugin) as a single `sillytavern.zip` file and provide your `config.yaml` content as a Hugging Face Secret.
 
 
 
 
21
 
22
  ## Setup and Deployment Steps
23
 
24
- 1. **Prepare Locally:**
25
- * Have a working local installation of SillyTavern.
26
- * Ensure the `data-sync` plugin (`https://github.com/fuwei99/data-sync.git`) is cloned into the `plugins/data-sync` directory within your local SillyTavern folder.
27
- * **Crucially: Delete the `config.yaml` file from your local SillyTavern directory before proceeding.** Its contents will be added as a secret.
28
-
29
- 2. **Create `sillytavern.zip`:**
30
- * Navigate **inside** your local SillyTavern directory (the one containing `server.js`, `public`, `plugins`, etc.).
31
- * Select **all files and folders** within this directory.
32
- * Create a zip archive named exactly `sillytavern.zip` from these selected contents.
33
- * **DO NOT** zip the parent SillyTavern folder itself; the zip file's root should contain `server.js`, etc.
34
- * *(Optional but Recommended)*: Exclude unnecessary files/folders like `.git`, `node_modules`, `chats/logs`, large backups, etc., to reduce the zip size.
35
-
36
- 3. **Upload to Hugging Face:**
37
- * Clone your Hugging Face Space repository locally or use the web UI.
38
- * Add/replace the following files in the root of your Space repository:
39
- * This `README.md` file.
40
- * The `Dockerfile` provided.
41
- * The `sillytavern.zip` file you created in step 2.
42
- * Commit and push the changes.
43
-
44
- 4. **Configure Secret:**
45
  * Go to your Space's **Settings** tab on Hugging Face.
46
  * Navigate to the **Secrets** section.
47
  * Click **New secret**.
48
  * Enter the name exactly as `CONFIG_YAML`.
49
- * Paste the **entire content** of your original (now deleted locally) `config.yaml` file into the **Secret value** field.
50
  * Save the secret.
51
 
 
 
 
 
 
 
 
 
 
 
52
  5. **Build and Launch:**
53
- * Hugging Face should automatically start building the Docker image based on the `Dockerfile` and your uploaded files.
 
 
54
  * Once the build is complete, the Space should launch SillyTavern.
55
 
56
- ## Accessing SillyTavern and Data Sync
57
 
58
  * Access the main SillyTavern interface via the public URL of your Space.
59
- * Access the data-sync plugin UI at `/api/plugins/data-sync/ui` relative to your Space's URL.
60
- * Remember to configure the data-sync plugin within its UI (repo URL, auth token if needed) and use its features to push/pull your data.
 
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`).