Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit a093a0d

Browse files
authored
Merge pull request #1447 from maaquib/master
Updating buildspecs related resources to py38
2 parents 73e68a7 + 361a62c commit a093a0d

16 files changed

+82
-91
lines changed

ci/buildspec_cpu_backup.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

ci/buildspec_gpu_backup.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

ci/launcher/launch_test.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
from utils import ec2 as ec2_utils
1616

1717
CPU_INSTANCE_COMMANDS_LIST = [
18-
"python3 ts_scripts/install_dependencies.py --environment=dev",
19-
"python3 torchserve_sanity.py",
18+
"python ts_scripts/install_dependencies.py --environment=dev",
19+
"python torchserve_sanity.py",
2020
"cd serving-sdk/ && mvn clean install -q && cd ../",
2121
]
2222

2323
GPU_INSTANCE_COMMANDS_LIST = [
24-
"python3 ts_scripts/install_dependencies.py --environment=dev --cuda=cu102",
25-
"python3 torchserve_sanity.py",
24+
"python ts_scripts/install_dependencies.py --environment=dev --cuda=cu102",
25+
"python torchserve_sanity.py",
2626
"cd serving-sdk/ && mvn clean install -q && cd ../",
2727
]
2828

@@ -38,7 +38,7 @@ def run_commands_on_ec2_instance(ec2_connection, is_gpu):
3838
virtual_env_name = "venv"
3939

4040
with ec2_connection.cd(f"/home/ubuntu/serve"):
41-
ec2_connection.run(f"python3 -m venv {virtual_env_name}")
41+
ec2_connection.run(f"python -m venv {virtual_env_name}")
4242
with ec2_connection.prefix(f"source {virtual_env_name}/bin/activate"):
4343
commands_list = GPU_INSTANCE_COMMANDS_LIST if is_gpu else CPU_INSTANCE_COMMANDS_LIST
4444

@@ -128,14 +128,13 @@ def launch_ec2_instance(region, instance_type, ami_id):
128128
else:
129129
ec2_connection.run(f"cd serve && git fetch origin {github_pull_request_number}")
130130

131-
ec2_connection.run(f"sudo apt-get install -y python3-venv")
131+
ec2_connection.run(f"sudo apt-get install -y python3.8-dev python3.8-distutils python3.8-venv")
132+
# update alternatives doesn't seem to work
133+
ec2_connection.run(f"sudo ln -fs /usr/bin/python3.8 /usr/bin/python")
132134
# Following is necessary on Base Ubuntu DLAMI because the default python is python2
133135
# This will NOT fail for other AMI where default python is python3
134136
ec2_connection.run(
135-
f"sudo cp /usr/local/bin/pip3 /usr/local/bin/pip && pip install --upgrade pip", warn=True
136-
)
137-
ec2_connection.run(
138-
f"sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1", warn=True
137+
f"curl -O https://bootstrap.pypa.io/get-pip.py && python get-pip.py", warn=True
139138
)
140139

141140
is_gpu = True if instance_type[:2] in GPU_INSTANCES else False
@@ -197,3 +196,4 @@ def main():
197196

198197
if __name__ == "__main__":
199198
main()
199+

requirements/common.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
future
22
psutil
3+
cython
34
wheel
45
requests
5-
sentencepiece
6-
pillow==8.3.2
6+
pillow==9.0.0
77
captum
88
packaging
99
numpy; sys_platform != 'win32'

requirements/torch_cu101_linux.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
22
--find-links https://download.pytorch.org/whl/torch_stable.html
3+
cython
4+
wheel
5+
pillow==9.0.0
36
torch==1.8.1+cu101; sys_platform == 'linux'
47
torchvision==0.9.1+cu101; sys_platform == 'linux'
58
torchtext==0.9.1; sys_platform == 'linux'
6-
torchaudio==0.8.1; sys_platform == 'linux'
9+
torchaudio==0.8.1; sys_platform == 'linux'

requirements/torch_cu102_linux.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# pip install torch torchvision
2+
cython
3+
wheel
4+
pillow==9.0.0
25
torch==1.10.0; sys_platform == 'linux'
36
torchvision==0.11.1; sys_platform == 'linux'
47
torchtext==0.11.0; sys_platform == 'linux'

requirements/torch_cu111_linux.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
22
--find-links https://download.pytorch.org/whl/torch_stable.html
3+
cython
4+
wheel
5+
pillow==9.0.0
36
torch==1.9.0+cu111; sys_platform == 'linux'
47
torchvision==0.10.0+cu111; sys_platform == 'linux'
58
torchtext==0.10.0; sys_platform == 'linux'
6-
torchaudio==0.9.0; sys_platform == 'linux'
9+
torchaudio==0.9.0; sys_platform == 'linux'

requirements/torch_cu113_linux.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio==0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
22
--find-links https://download.pytorch.org/whl/torch_stable.html
3+
cython
4+
wheel
5+
pillow==9.0.0
36
torch==1.10.0+cu113; sys_platform == 'linux'
47
torchvision==0.11.1+cu113; sys_platform == 'linux'
58
torchtext==0.11.0; sys_platform == 'linux'

requirements/torch_cu92_linux.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#pip install torch==1.8.1+cu92 torchvision==0.9.1+cu92 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
22
--find-links https://download.pytorch.org/whl/torch_stable.html
3+
cython
4+
wheel
5+
pillow==9.0.0
36
torch==1.8.1+cu92; sys_platform == 'linux'
47
torchvision==0.9.1+cu92; sys_platform == 'linux'
58
torchtext==0.9.1; sys_platform == 'linux'
6-
torchaudio==0.8.1; sys_platform == 'linux'
9+
torchaudio==0.8.1; sys_platform == 'linux'

requirements/torch_linux.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#pip3 install torch==1.10.0+cpu torchvision==0.11.1+cpu torchaudio==0.10.0+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
22
--find-links https://download.pytorch.org/whl/cpu/torch_stable.html
3+
cython
4+
wheel
5+
pillow==9.0.0
36
torch==1.10.0+cpu; sys_platform == 'linux'
47
torchvision==0.11.1+cpu; sys_platform == 'linux'
58
torchtext==0.11.0; sys_platform == 'linux'

0 commit comments

Comments
 (0)