Re-running/restarting the game

Hi :wave:,

I use the following to run the game/engine:


If I make changes to my bot’s code, I end the process with ctrl + c. Then run the command again. When I rerun the command the terminal starts here:

Step 9/11 : COPY --from=build /app/publish .

Which takes up to 5 minutes to start. Which slows down development productivity.
My question is if there are anyways to do this faster.

Thanks in advance for your assistance. :grinning:

Are you building your bot inside the starter bots folder? If you are, you’re causing docker to invalidate its cache each time you make a change to your own bot. So, if you are doing that, just move your bot outside of the starter bots folder, then docker should just reuse its cache which should be much faster.

EDIT: Just had a look at the run script (should’ve probably done that first :sweat_smile: ) - the docker build context shouldn’t include the starter bots folder in the repo. But, if you’re building your bot inside the 2023-CyFi/2023-CyFi folder, what I said above is still true.

Hi @KodinGuy!

@kobus-v-schoor is correct that it invalidates the build cache, but we will look at optimisations to the docker build process. If you want the engine to run a bit faster, you can also look at running the engine without docker. If you cd into the Cy-Fi project folder (2023-Cy-Fi/CyFi, the one containing CyFi.csproj), you should be able to build with dotnet build and run with dotnet run (assuming you have .NET installed)

Hi, thanks for the responses.

How can I fix the following after running dotnet run.

2023-05-17T20:34:27.0335318+02:00 Information  - Starting System.Private.CoreLib
SignalR Confighttp://
Start position {X=23,Y=14} 
Start position {X=42,Y=22} 
Start position {X=448,Y=43} 
Start position {X=226,Y=101} 
2023-05-17T20:34:27.9885017+02:00 Information Runner.Services.CloudIntegrationService - Cloud Callback Initiated, Status: initializing, Callback player Count: 
2023-05-17T20:34:28.0186036+02:00 Warning Runner.Services.CloudIntegrationService - Failed to make cloud callback with error: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set.
2023-05-17T20:34:28.2433119+02:00 Fatal  - System.Private.CoreLib failed to start

Hey @KodinGuy :slight_smile:

Have you run dotnet restore?

Thanks, I’ll keep that in mind for next time :grinning:. The problem was that there was an existing session running in another terminal.

Thanks anyways, though.

1 Like