microsoft / ProjectAcoustics

Microsoft Project Acoustics
https://aka.ms/acoustics
Creative Commons Attribution 4.0 International
141 stars 22 forks source link

Docker error during local bake #203

Open DivinorWieldor opened 7 months ago

DivinorWieldor commented 7 months ago

Hi there!

I require some guidance on how to best utilize docker for my project. I have a basic scene with 6 objects for the acoustics to consider. I followed all steps and acquired a .bat file for local bake. I have additionally installed docker to complete the baking process.

The program is able to download an image to docker, however it reports an error when trying to run the image. Docker requests a config file in order to process the simulation:

Need config file to process the simulation. Use --Help.

No .enc files are created after this and so the del *.enc command also fails.

I am unfamiliar with docker and so unsure on how to proceed beyond this issue.

Thank you for your assistance.

Edit: I forgot to add system information. I am using Windows 11 Education, Docker 4.29

NoelCross commented 7 months ago

@DivinorWieldor If you have calculated the probes for the scene, then a XXX_config.xml and *.vox file will be generated for your map. You'll need to specify the location where these two files are located for the bake tools to work properly.

DivinorWieldor commented 7 months ago

@NoelCross thanks for your reply.

the .xml and .vox files are both in the same file as the .bat file. Do I still need to specify their locations for the docker run command? I have no experience with docker or its arguments but from what I see the default .bat should be doing what you stated.

--configfile is set to *.xml --workingdir is set to working which I assume is wherever the .bat file is. There is no command to load in the *.vox file I am unsure what the -w and -v commands do, but I assume they are for processes that happen within docker.

I'd highly appreciate some guidance on which parts I need to modify to fix the batch file. I have pasted the docker run command below, just in case there is an issue with it.

docker run --rm -w /acoustics/ -v "%CD%":/acoustics/working/ [microsoft acoustics baketool image address] ./tools/Triton.localProcessor --configfile [*.xml file] --workingdir working

NoelCross commented 7 months ago

@DivinorWieldor sorry to hear that you are having so much trouble with the local bake process.

--configfile points to a xxx_config.xml file and there is an assumption that the matching .vox file is in the same directory. This is the input directory. --workingdir is the directory where the .enc files and eventually the *.ace file is generated. It's the output directory.

When you select "Prepare for Local Bake", what happens is a custom batch file is created, runlocalbake.bat, which is located in the same folder as the config file. The config file name is pre-populated in the batch file so all you should need to do is execute the batch file with no arguments. The working directory is called "working" as that's the scratch directory that's used on the docker VM hosted by Docker.

Once the .ace file is created, rename to *.ace.bytes and then copy the file into your assets folder and reference the ACE file in the Acoustics Manager game object.