fixed to work with launchd
This commit is contained in:
parent
0ec82db13f
commit
7cd8d4accc
|
@ -94,9 +94,9 @@ with tempfile.TemporaryDirectory() as directory:
|
||||||
arch = os.popen("uname -m").read()
|
arch = os.popen("uname -m").read()
|
||||||
print("Generating 3D Model")
|
print("Generating 3D Model")
|
||||||
if "x86" in arch:
|
if "x86" in arch:
|
||||||
os.system("docker run -it --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz")
|
os.system("docker run --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz")
|
||||||
elif "aarch64" in arch:
|
elif "aarch64" in arch:
|
||||||
os.system("docker run -it --rm -v $(pwd):/usr/app navanchauhan/usd-from-gltf:latest model.gltf model.usdz")
|
os.system("docker run --rm -v $(pwd):/usr/app navanchauhan/usd-from-gltf:latest model.gltf model.usdz")
|
||||||
try:
|
try:
|
||||||
copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz")))
|
copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz")))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
|
|
@ -167,6 +167,7 @@ date = records[6]
|
||||||
|
|
||||||
|
|
||||||
cd = os.getcwd()
|
cd = os.getcwd()
|
||||||
|
print("Curie-Web Directory is:",cd)
|
||||||
f = os.path.join(cd,"static/uploads")
|
f = os.path.join(cd,"static/uploads")
|
||||||
scripts = os.path.join(cd,"scripts")
|
scripts = os.path.join(cd,"scripts")
|
||||||
reportDirectory = os.path.join(f,"reports")
|
reportDirectory = os.path.join(f,"reports")
|
||||||
|
@ -222,27 +223,29 @@ with tempfile.TemporaryDirectory() as directory:
|
||||||
try:
|
try:
|
||||||
copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf")))
|
copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf")))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
reason = "Could not generate the report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
|
reason = "Could not generate the PDF report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
|
||||||
email(toaddr,jobID,date,description,zipArchive=zi,reason=reason)
|
email(toaddr,jobID,date,description,zipArchive=zi,reason=reason)
|
||||||
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
|
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
|
||||||
mycon.commit()
|
mycon.commit()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
get3DModel(pdbpath,"%s_out.pdbqt"%(records[4]))
|
get3DModel(pdbpath,"%s_out.pdbqt"%(records[4]))
|
||||||
except:
|
except:
|
||||||
reason = "Could not generate the report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
|
email(toaddr,jobID,date,description,zipArchive=zi)
|
||||||
email(toaddr,jobID,date,description,zipArchive=zi,reason=reason)
|
|
||||||
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
|
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))
|
||||||
mycon.commit()
|
mycon.commit()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
"""
|
||||||
|
get3DModel(pdbpath,"%s_out.pdbqt"%(records[4]))
|
||||||
os.system("collada2gltf -i model.dae -o model.gltf")
|
os.system("collada2gltf -i model.dae -o model.gltf")
|
||||||
copyfile("model.gltf",os.path.join(modelDirectory,(str(jobID)+".gltf")))
|
copyfile("model.gltf",os.path.join(modelDirectory,(str(jobID)+".gltf")))
|
||||||
arch = os.popen("uname -m").read()
|
arch = os.popen("uname -m").read()
|
||||||
print("Generating 3D Model")
|
print("Generating 3D Model")
|
||||||
if "x86" in arch:
|
if "x86" in arch:
|
||||||
os.system("docker run -it --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz")
|
os.system("docker run --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz")
|
||||||
elif "aarch64" in arch:
|
elif "aarch64" in arch:
|
||||||
os.system("docker run -it --rm -v $(pwd):/usr/app navanchauhan/usd-from-gltf:latest model.gltf model.usdz")
|
os.system("docker run --rm -v $(pwd):/usr/app navanchauhan/usd-from-gltf:latest model.gltf model.usdz")
|
||||||
try:
|
try:
|
||||||
copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz")))
|
copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz")))
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue