diff --git a/Dockerfile b/Dockerfile index 8390d79..6ec98b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,26 @@ # Use the Epic Games UE runtime as base FROM ghcr.io/epicgames/unreal-engine:runtime +USER root + # Set working directory WORKDIR /app # Copy your packages into the container COPY Packages/ /app/Packages/ +RUN chown -R ue4:ue4 /app && \ + chmod -R 755 /app && \ + chmod +x /app/Packages/Manager/evolved-npcs && \ + chmod u+w /app/Packages/ -R # Add write permissions to Packages directory + # Install any additional dependencies if needed # RUN apt-get update && apt-get install -y # Set any environment variables # ENV UE_PROJECT_ROOT=/app +USER ue4 + # Default command (modify as needed) CMD ["/bin/bash"] \ No newline at end of file diff --git a/evolved-npcs/src/fighter_nn/mod.rs b/evolved-npcs/src/fighter_nn/mod.rs index 3fa753a..9998af0 100644 --- a/evolved-npcs/src/fighter_nn/mod.rs +++ b/evolved-npcs/src/fighter_nn/mod.rs @@ -846,6 +846,12 @@ async fn run_1v1_simulation( trace!("Running simulation for {} vs {}", nn_1_id, nn_2_id); + // Validate and log that executable path exists + if !Path::new(GAME_EXECUTABLE_PATH).exists() { + error!("Game executable not found at path: {}", GAME_EXECUTABLE_PATH); + return Err(anyhow!("Game executable not found at path: {}", GAME_EXECUTABLE_PATH).into()); + } + // let _output = if display_simulation { // Command::new(GAME_EXECUTABLE_PATH) // .arg(&config1_arg)