Skip to content

Commit 13f5748

Browse files
authored
Update build_all.py
This will fix #168 but still fail on beataml and mpnst download
1 parent 67b809e commit 13f5748

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

build/build_all.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ def run_cmd(cmd_arr,filename):
1313
'''
1414
print('running...'+filename)
1515
env = os.environ.copy()
16-
docker_run = ['docker','run','-v',env['PWD']+'/local/:/tmp/','-e','SYNAPSE_AUTH_TOKEN='+env['SYNAPSE_AUTH_TOKEN'],'--platform=linux/amd64']
16+
if 'SYNAPSE_AUTH_TOKEN' not in env.keys():
17+
print('You need to set the SYNAPSE_AUTH_TOKEN to acess the MPNST and beatAML Datasets')
18+
docker_run = ['docker','run','-v',env['PWD']+'/local/:/tmp/','--platform=linux/amd64']
19+
else:
20+
docker_run = ['docker','run','-v',env['PWD']+'/local/:/tmp/','-e','SYNAPSE_AUTH_TOKEN='+env['SYNAPSE_AUTH_TOKEN'],'--platform=linux/amd64']
1721
cmd = docker_run+cmd_arr
1822
print(cmd)
1923
res = subprocess.run(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
@@ -53,8 +57,11 @@ def main():
5357
dlist.append(dsname)
5458
#cmd = 'docker build --platform=linux/amd64 -t '+dsname+' . -f build/docker/'+fn+ ' --build-arg HTTPS_PROXY=$HTTPS_PROXY'
5559
#print(cmd)
56-
res = subprocess.run(['docker','build','-t',dsname,'.','-f','build/docker/'+fn,'--build-arg','HTTPS_PROXY='+env['HTTPS_PROXY'],'--platform','linux/amd64'])
57-
#os.system(cmd)
60+
if 'HTTPS_PROXY' in env.keys():
61+
res = subprocess.run(['docker','build','-t',dsname,'.','-f','build/docker/'+fn,'--build-arg','HTTPS_PROXY='+env['HTTPS_PROXY'],'--platform','linux/amd64'])
62+
else:
63+
res = subprocess.run(['docker','build','-t',dsname,'.','-f','build/docker/'+fn,'--platform','linux/amd64'])
64+
#os.system(cmd)
5865

5966
### Any new sample creation must happened here.
6067
### Each sample file requires the previous one to be created

0 commit comments

Comments
 (0)