Spaces:
Sleeping
Sleeping
Commit
·
5d022af
1
Parent(s):
58ded4a
update
Browse files- Dockerfile +0 -1
- run.sh +9 -2
Dockerfile
CHANGED
@@ -40,7 +40,6 @@ ENV HOME=/home/user \
|
|
40 |
GRADIO_ALLOW_FLAGGING=never \
|
41 |
GRADIO_NUM_PORTS=1 \
|
42 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
43 |
-
GRADIO_SERVER_PORT=7861 \
|
44 |
GRADIO_THEME=huggingface \
|
45 |
SYSTEM=spaces
|
46 |
# Set the working directory to the user's home directory
|
|
|
40 |
GRADIO_ALLOW_FLAGGING=never \
|
41 |
GRADIO_NUM_PORTS=1 \
|
42 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
|
|
43 |
GRADIO_THEME=huggingface \
|
44 |
SYSTEM=spaces
|
45 |
# Set the working directory to the user's home directory
|
run.sh
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
#!/bin/bash
|
|
|
2 |
CONDA_ENV=$(head -1 /code/environment.yml | cut -d" " -f2)
|
3 |
eval "$(conda shell.bash hook)"
|
4 |
-
# conda activate $CONDA_ENV
|
5 |
conda activate gradio-user
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
+
|
3 |
CONDA_ENV=$(head -1 /code/environment.yml | cut -d" " -f2)
|
4 |
eval "$(conda shell.bash hook)"
|
|
|
5 |
conda activate gradio-user
|
6 |
+
|
7 |
+
# Check if app.py is already running
|
8 |
+
if pgrep -f "python app.py" > /dev/null; then
|
9 |
+
echo "app.py is already running. Skipping launch."
|
10 |
+
else
|
11 |
+
echo "Starting app.py..."
|
12 |
+
python app.py
|
13 |
+
fi
|