Spaces:
Build error
Build error
File size: 1,053 Bytes
f2ae3ad 8c586aa f2ae3ad 5ae0b37 86ed0ec 5fa8a70 4a9d38b 8c586aa 4a9d38b 59d6df8 5fa8a70 4a9d38b 8c586aa 5fa8a70 59d6df8 f2ae3ad 8d604f9 f2ae3ad 59d6df8 86ed0ec 02200f4 5fa8a70 8d604f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#!/bin/bash
set -eux # Keep this for debugging and seeing command execution
export CUDA_VISIBLE_DEVICES="0"
export CUDA_HOME="/usr/local/cuda"
echo "Activating Conda environment and starting server..."
# Temporarily disable 'exit on unbound variable' (-u) for conda activate
# This is necessary because some conda activate scripts might try to use
# variables that are not always set, which 'set -u' would treat as an error.
set +u # Disable 'exit on unbound variable'
# Activate the specific conda environment
. $CONDA_DIR/etc/profile.d/conda.sh # Source the conda.sh for the shell
conda activate cosmos-predict1 # Activate the environment
set -u # Re-enable 'exit on unbound variable' for the rest of the script
# Set PYTHONPATH after conda activation for your specific project modules
export PYTHONPATH="/app:/app/gui/api"
echo "Starting GEN3C FastAPI inference server..."
export GEN3C_CKPT_PATH="/app/checkpoints"
export GEN3C_GPU_COUNT=1
# Start the FastAPI server
exec uvicorn gui.api.server:app --host 0.0.0.0 --port 7860 --proxy-headers |