Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -21
Dockerfile
CHANGED
@@ -1,24 +1,3 @@
|
|
1 |
-
# With this dockerfile in a Huggingface space you will get an entire AnythingLLM instance running
|
2 |
-
# in your space with all features you would normally get from the docker based version of AnythingLLM.
|
3 |
-
#
|
4 |
-
# How to use
|
5 |
-
# - Login to https://huggingface.co/spaces
|
6 |
-
# - Click on "Create new Space"
|
7 |
-
# - Name the space and select "Docker" as the SDK w/ a blank template
|
8 |
-
# - The default 2vCPU/16GB machine is OK. The more the merrier.
|
9 |
-
# - Decide if you want your AnythingLLM Space public or private.
|
10 |
-
# **You might want to stay private until you at least set a password or enable multi-user mode**
|
11 |
-
# - Click "Create Space"
|
12 |
-
# - Click on "Settings" on top of page (https://huggingface.co/spaces/<username>/<space-name>/settings)
|
13 |
-
# - Scroll to "Persistent Storage" and select the lowest tier of now - you can upgrade if you run out.
|
14 |
-
# - Confirm and continue storage upgrade
|
15 |
-
# - Go to "Files" Tab (https://huggingface.co/spaces/<username>/<space-name>/tree/main)
|
16 |
-
# - Click "Add Files"
|
17 |
-
# - Upload this file or create a file named `Dockerfile` and copy-paste this content into it. "Commit to main" and save.
|
18 |
-
# - Your container will build and boot. You now have AnythingLLM on HuggingFace. Your data is stored in the persistent storage attached.
|
19 |
-
# Have Fun 🤗
|
20 |
-
# Have issues? Check the logs on HuggingFace for clues.
|
21 |
-
|
22 |
FROM mintplexlabs/anythingllm:render
|
23 |
|
24 |
USER root
|
@@ -37,8 +16,14 @@ ENV SERVER_PORT=7860
|
|
37 |
# Copy the custom script that handles copying storage data
|
38 |
COPY copy-storage.sh /usr/local/bin/copy-storage.sh
|
39 |
|
|
|
|
|
|
|
40 |
# Ensure the script has execution permissions
|
41 |
RUN chmod +x /usr/local/bin/copy-storage.sh
|
42 |
|
|
|
|
|
|
|
43 |
# Set the entry point to run the script and the main application
|
44 |
ENTRYPOINT ["/bin/bash", "/usr/local/bin/copy-storage.sh", "&&", "/bin/bash", "/usr/local/bin/render-entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM mintplexlabs/anythingllm:render
|
2 |
|
3 |
USER root
|
|
|
16 |
# Copy the custom script that handles copying storage data
|
17 |
COPY copy-storage.sh /usr/local/bin/copy-storage.sh
|
18 |
|
19 |
+
# Switch back to root to modify permissions
|
20 |
+
USER root
|
21 |
+
|
22 |
# Ensure the script has execution permissions
|
23 |
RUN chmod +x /usr/local/bin/copy-storage.sh
|
24 |
|
25 |
+
# Switch back to the anythingllm user
|
26 |
+
USER anythingllm
|
27 |
+
|
28 |
# Set the entry point to run the script and the main application
|
29 |
ENTRYPOINT ["/bin/bash", "/usr/local/bin/copy-storage.sh", "&&", "/bin/bash", "/usr/local/bin/render-entrypoint.sh"]
|