Spaces:
Paused
Paused
Upload 4 files
Browse files- .gitattributes +1 -0
- Dockerfile +26 -0
- README.md +5 -3
- app +3 -0
- start.sh +14 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
app filter=lfs diff=lfs merge=lfs -text
|
Dockerfile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
|
| 3 |
+
# Set up a new user named "user" with user ID 1000
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
|
| 6 |
+
# Switch to the "user" user
|
| 7 |
+
USER user
|
| 8 |
+
|
| 9 |
+
# Set home to the user's home directory
|
| 10 |
+
ENV HOME=/home/user \
|
| 11 |
+
PATH=/home/user/.local/bin:$PATH
|
| 12 |
+
|
| 13 |
+
# Set the working directory to the user's home directory
|
| 14 |
+
WORKDIR $HOME/app
|
| 15 |
+
|
| 16 |
+
COPY --chown=user . $HOME/app
|
| 17 |
+
RUN chmod +x $HOME/app/app
|
| 18 |
+
|
| 19 |
+
# Copy the start script and make it executable
|
| 20 |
+
COPY --chown=user start.sh $HOME/app/
|
| 21 |
+
RUN chmod +x $HOME/app/start.sh
|
| 22 |
+
|
| 23 |
+
# Use the start script as the entry point
|
| 24 |
+
CMD ["./start.sh"]
|
| 25 |
+
|
| 26 |
+
EXPOSE 5244
|
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: red
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Storage
|
| 3 |
+
emoji: ⚡
|
| 4 |
+
colorFrom: pink
|
| 5 |
colorTo: red
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
app_port : 5244
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e600c7cc6dd3ed08aa5c74ff7cffc6735cfdf547d2715fce2c2a135944f2e7a3
|
| 3 |
+
size 27467840
|
start.sh
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Replace placeholders in config.json with environment variables
|
| 4 |
+
sed -i "s|ENV_Alist_DB_TYPE|${Alist_DB_TYPE:-mysql}|g" $HOME/app/data/config.json
|
| 5 |
+
sed -i "s|ENV_Alist_DB_HOST|${Alist_DB_HOST:-localhost}|g" $HOME/app/data/config.json
|
| 6 |
+
sed -i "s|ENV_Alist_DB_PORT|${Alist_DB_PORT:-3306}|g" $HOME/app/data/config.json
|
| 7 |
+
sed -i "s|ENV_Alist_DB_USER|${Alist_DB_USER:-root}|g" $HOME/app/data/config.json
|
| 8 |
+
sed -i "s|ENV_Alist_DB_PASSWORD|${Alist_DB_PASSWORD:-password}|g" $HOME/app/data/config.json
|
| 9 |
+
sed -i "s|ENV_Alist_DB_NAME|${Alist_DB_NAME:-alist}|g" $HOME/app/data/config.json
|
| 10 |
+
|
| 11 |
+
# cat $HOME/app/data/config.json
|
| 12 |
+
|
| 13 |
+
# Start the alist server
|
| 14 |
+
cd $HOME/app && ./app server
|