Spaces:
Build error
Build error
Temporarily disable 'set -u' around conda activate to resolve MKL unbound variable error
Browse files
start.sh
CHANGED
@@ -1,16 +1,22 @@
|
|
1 |
#!/bin/bash
|
2 |
-
set -eux
|
3 |
|
4 |
export CUDA_VISIBLE_DEVICES="0"
|
5 |
export CUDA_HOME="/usr/local/cuda"
|
6 |
|
7 |
echo "Activating Conda environment and starting server..."
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
# Activate the specific conda environment
|
10 |
-
# Use '. ' (dot space) instead of 'source'
|
11 |
. $CONDA_DIR/etc/profile.d/conda.sh # Source the conda.sh for the shell
|
12 |
conda activate cosmos-predict1 # Activate the environment
|
13 |
|
|
|
|
|
14 |
# Set PYTHONPATH after conda activation for your specific project modules
|
15 |
export PYTHONPATH="/app:/app/gui/api"
|
16 |
|
|
|
1 |
#!/bin/bash
|
2 |
+
set -eux # Keep this for debugging and seeing command execution
|
3 |
|
4 |
export CUDA_VISIBLE_DEVICES="0"
|
5 |
export CUDA_HOME="/usr/local/cuda"
|
6 |
|
7 |
echo "Activating Conda environment and starting server..."
|
8 |
|
9 |
+
# Temporarily disable 'exit on unbound variable' (-u) for conda activate
|
10 |
+
# This is necessary because some conda activate scripts might try to use
|
11 |
+
# variables that are not always set, which 'set -u' would treat as an error.
|
12 |
+
set +u # Disable 'exit on unbound variable'
|
13 |
+
|
14 |
# Activate the specific conda environment
|
|
|
15 |
. $CONDA_DIR/etc/profile.d/conda.sh # Source the conda.sh for the shell
|
16 |
conda activate cosmos-predict1 # Activate the environment
|
17 |
|
18 |
+
set -u # Re-enable 'exit on unbound variable' for the rest of the script
|
19 |
+
|
20 |
# Set PYTHONPATH after conda activation for your specific project modules
|
21 |
export PYTHONPATH="/app:/app/gui/api"
|
22 |
|