Spaces:
Sleeping
Sleeping
fabiogra
commited on
Commit
•
141bd52
1
Parent(s):
85a7085
feat: use PREPARE_SAMPLES env var
Browse files- README.md +3 -0
- scripts/prepare_samples.sh +6 -0
README.md
CHANGED
@@ -75,6 +75,9 @@ docker run -it -p 7860:7860 --platform=linux/amd64 \
|
|
75 |
You can set the following environment variables to limit the resources used by the app:
|
76 |
- ENV_LIMITATION=true
|
77 |
- LIMIT_CPU=true
|
|
|
|
|
|
|
78 |
---
|
79 |
## About
|
80 |
|
|
|
75 |
You can set the following environment variables to limit the resources used by the app:
|
76 |
- ENV_LIMITATION=true
|
77 |
- LIMIT_CPU=true
|
78 |
+
|
79 |
+
If you want to use a prepare the samples used in the demo, you need to set the env variable `PREPARE_SAMPLES=true`
|
80 |
+
|
81 |
---
|
82 |
## About
|
83 |
|
scripts/prepare_samples.sh
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
#!/bin/bash
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
# Read JSON file into a variable
|
4 |
json=$(cat sample_songs.json)
|
5 |
|
|
|
1 |
#!/bin/bash
|
2 |
|
3 |
+
# Check if the "PREPARE_SAMPLES" environment variable is set
|
4 |
+
if [ -z "${PREPARE_SAMPLES}" ]; then
|
5 |
+
echo "PREPARE_SAMPLES is unset or set to the empty string. Skipping sample preparation."
|
6 |
+
exit 1
|
7 |
+
fi
|
8 |
+
|
9 |
# Read JSON file into a variable
|
10 |
json=$(cat sample_songs.json)
|
11 |
|