File tree 1 file changed +13
-2
lines changed
3.test_cases/pytorch/FSDP/slurm
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,22 @@ set -ex
4
4
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
5
# SPDX-License-Identifier: MIT-0
6
6
7
- PYTHON_VERSION=$( python3 --version | awk ' {print $2}' | awk -F' .' ' {print $1"."$2}' )
7
+ PYTHON_V=python3
8
+ OS_VERSION=$( cat /etc/os-release | grep VERSION_ID | awk -F ' =' ' {print $2}' )
9
+ OS_VERSION=${OS_VERSION// \" / }
10
+
11
+ if [ $OS_VERSION = " 20.04" ]; then
12
+
13
+ PYTHON_VERSION=$( python3.9 --version | awk ' {print $2}' | awk -F' .' ' {print $1"."$2}' )
14
+ PYTHON_V=python3.9
15
+ else
16
+ PYTHON_VERSION=$( python3 --version | awk ' {print $2}' | awk -F' .' ' {print $1"."$2}' )
17
+ fi
18
+
8
19
sudo apt install -y python$PYTHON_VERSION -venv
9
20
10
21
# Create and actiate Python virtual environment
11
- python3 -m venv env
22
+ $PYTHON_V -m venv env
12
23
source ./env/bin/activate
13
24
14
25
pip install -r ../src/requirements.txt
You can’t perform that action at this time.
0 commit comments