shayan05 commited on
Commit
298d652
·
verified ·
1 Parent(s): 42fd480

Update startup.sh

Browse files
Files changed (1) hide show
  1. startup.sh +26 -15
startup.sh CHANGED
@@ -1,15 +1,26 @@
1
- #!/bin/bash
2
- set -e # Exit on error
3
-
4
- echo "Starting environment setup..."
5
-
6
- # Enable CUDA debugging
7
- export TORCH_USE_CUDA_DSA=1
8
- export CUDA_LAUNCH_BLOCKING=1
9
-
10
- # Upgrade bitsandbytes (may fix your issue)
11
- pip install --upgrade bitsandbytes
12
-
13
- # Debugging info
14
- nvidia-smi
15
- python -c "import torch; print(torch.cuda.is_available())"
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e # Exit on error
3
+ set -x # Print commands for debugging
4
+
5
+ echo "Starting environment setup..."
6
+
7
+ # Enable device-side assertions
8
+ export TORCH_USE_CUDA_DSA=1
9
+ export CUDA_LAUNCH_BLOCKING=1
10
+
11
+ # Hugging Face cache settings (recommended)
12
+ export HF_HOME=/cache
13
+ export TRANSFORMERS_CACHE=/cache/transformers
14
+ export BITSANDBYTES_NOWELCOME=1
15
+ export HF_HUB_ENABLE_HF_TRANSFER=1
16
+
17
+ # Debugging info (before launching the model)
18
+ echo "CUDA Info:"
19
+ nvidia-smi
20
+ python -c "import torch; print('CUDA Available:', torch.cuda.is_available())"
21
+
22
+ # Upgrade bitsandbytes (before launching to avoid runtime issues)
23
+ pip install --upgrade bitsandbytes
24
+
25
+ # Start the model (this should be the last command)
26
+ exec text-generation-launcher