Skip to content

Commit 984c157

Browse files
committed
Install cookbook deps
1 parent 48010f8 commit 984c157

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cookbooks/aws-parallelcluster-platform/recipes/install/cookbook_virtualenv.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,20 @@
3535
action :create_if_missing
3636
end
3737

38+
cookbook_file "#{cookbook_virtualenv_path}/requirements.txt" do
39+
source "cookbook_virtualenv/requirements.txt"
40+
mode '0755'
41+
end
42+
3843
bash 'pip install' do
3944
user 'root'
4045
group 'root'
41-
cwd "#{node['cluster']['base_dir']}"
4246
code <<-REQ
43-
set -e
44-
tar xzf cookbook-dependencies.tgz
45-
cd dependencies
46-
#{virtualenv_path}/bin/pip install * -f ./ --no-index
47+
#{virtualenv_path}/bin/pip install -r #{cookbook_virtualenv_path}/requirements.txt
48+
if [ $? -ne 0 ]; then
49+
tar xzf cookbook-dependencies.tgz
50+
cd dependencies
51+
#{virtualenv_path}/bin/pip install * -f ./ --no-index
52+
fi
4753
REQ
4854
end

0 commit comments

Comments
 (0)