Last active
September 22, 2025 09:48
-
-
Save limcheekin/8894cca80ffc2e6bcc0136ee0cff7fa2 to your computer and use it in GitHub Desktop.
Bash script to start FastWhisperAPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check if conda environment is activated | |
| if [[ "$CONDA_PREFIX" != "$(pwd)/.conda" ]]; then | |
| echo "Activating conda environment..." | |
| # Initialize conda for this shell if not already | |
| if ! command -v conda &> /dev/null; then | |
| echo "conda not found in PATH. Make sure Conda is installed and initialized." | |
| exit 1 | |
| fi | |
| eval "$(conda shell.bash hook)" | |
| conda activate "$(pwd)/.conda" | |
| else | |
| echo "Conda environment already activated." | |
| fi | |
| FORCE_CPU=true fastapi run main.py --port 8882 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check if the virtual environment is activated | |
| if [[ -z "$VIRTUAL_ENV" ]]; then | |
| echo "Activating virtual environment..." | |
| source .venv/bin/activate | |
| else | |
| echo "Virtual environment already activated." | |
| fi | |
| FORCE_CPU=true fastapi run main.py --port 8882 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment