roll-ai commited on
Commit
46aba71
Β·
verified Β·
1 Parent(s): bdc9df4

Rename setup_runtime.sh to setup.sh

Browse files
Files changed (2) hide show
  1. setup.sh +33 -0
  2. setup_runtime.sh +0 -24
setup.sh ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ echo "πŸ”§ Starting environment setup..."
5
+
6
+ # Miniconda install path
7
+ CONDA_DIR=/opt/conda
8
+
9
+ # Download and install Miniconda to /opt/conda
10
+ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh
11
+ bash /tmp/miniconda.sh -b -u -p $CONDA_DIR
12
+ rm /tmp/miniconda.sh
13
+ export PATH="$CONDA_DIR/bin:$PATH"
14
+
15
+ # Create environment
16
+ conda update -y -n base -c defaults conda
17
+ conda env create -f /cosmos-predict1.yaml
18
+ source $CONDA_DIR/bin/activate cosmos-predict1
19
+
20
+ # Install Python dependencies
21
+ pip install --no-cache-dir -r /requirements.txt
22
+ pip install transformer-engine[pytorch]==1.12.0
23
+ pip install git+https://github.com/microsoft/MoGe.git
24
+
25
+ # Build and install Apex
26
+ git clone https://github.com/NVIDIA/apex.git
27
+ cd apex
28
+ CUDA_HOME=$CONDA_DIR pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation \
29
+ --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" .
30
+ cd ..
31
+ rm -rf apex
32
+
33
+ echo "βœ… Environment setup complete."
setup_runtime.sh DELETED
@@ -1,24 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo "πŸš€ Installing Python packages..."
4
-
5
- # Install core dependencies from pip
6
- pip install --upgrade pip
7
- pip install --no-cache-dir -r /requirements.txt
8
-
9
- # Transformer Engine
10
- pip install transformer-engine[pytorch]==1.12.0
11
-
12
- # Apex
13
- git clone https://github.com/NVIDIA/apex
14
- cd apex
15
- CUDA_HOME=/usr/local/cuda pip install -v --no-cache-dir --disable-pip-version-check --no-build-isolation \
16
- --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" .
17
- cd ..
18
-
19
- # MoGe
20
- pip install git+https://github.com/microsoft/MoGe.git
21
-
22
- # Launch your app
23
- cd /app
24
- python app.py