From 6b1a2bc34ac7398bff0b181c789f4628cd9b0d93 Mon Sep 17 00:00:00 2001 From: TakesxiSximada Date: Sun, 8 Oct 2023 20:49:33 +0900 Subject: [PATCH 1/2] fix GLEW library build configuration --- evogym/simulator/CMakeLists.txt | 4 +++- evogym/simulator/FindGLEW.cmake | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 evogym/simulator/FindGLEW.cmake diff --git a/evogym/simulator/CMakeLists.txt b/evogym/simulator/CMakeLists.txt index 09b6add4..64dc7ee8 100644 --- a/evogym/simulator/CMakeLists.txt +++ b/evogym/simulator/CMakeLists.txt @@ -19,6 +19,9 @@ endif() if(UNIX) find_package(OpenGL REQUIRED) + set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) # use custom FindGLEW.cmake + set(GLEW_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/externals/glew/include) + set(GLEW_LIBRARY ${PROJECT_SOURCE_DIR}/externals/glew/lib/libGLEW.*) find_package(GLEW REQUIRED) endif() @@ -46,4 +49,3 @@ add_subdirectory(SimulatorCPP/) set(CMAKE_CXX_STANDARD_LIBRARIES -ldl) # set(CMAKE_VERBOSE_MAKEFILE ON) - diff --git a/evogym/simulator/FindGLEW.cmake b/evogym/simulator/FindGLEW.cmake new file mode 100644 index 00000000..04491133 --- /dev/null +++ b/evogym/simulator/FindGLEW.cmake @@ -0,0 +1,23 @@ +# FindGLEW.cmake +# Search for GLEW library and include directories + +find_path(GLEW_INCLUDE_DIR GL/glew.h) +find_library(GLEW_LIBRARY NAMES GLEW GLEW32) + +if (GLEW_INCLUDE_DIR AND GLEW_LIBRARY) + set(GLEW_FOUND TRUE) +else() + set(GLEW_FOUND FALSE) +endif() + +if (GLEW_FOUND) + if (NOT GLEW_FIND_QUIETLY) + message(STATUS "Found GLEW: ${GLEW_LIBRARY}") + endif () +else() + if (GLEW_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find GLEW") + endif () +endif() + +mark_as_advanced(GLEW_INCLUDE_DIR GLEW_LIBRARY) From 48b7e249db7a3fb07e298387ad5d147e733bcd2c Mon Sep 17 00:00:00 2001 From: TakesxiSximada Date: Sun, 22 Oct 2023 14:57:31 +0900 Subject: [PATCH 2/2] update environment.yml according to requirements.txt - update gym version 0.22.0 - remove stable-baselines3 --- environment.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index baa1d148..faf4a475 100644 --- a/environment.yml +++ b/environment.yml @@ -8,7 +8,7 @@ dependencies: - glfw==2.5.0 - gpy==1.10.0 - git+https://github.com/yunshengtian/neat-python@2762ab630838520ca6c03a866e8a158f592b0370 - - gym==0.19.0 + - gym==0.22.0 - h5py==3.6.0 - imageio==2.14.1 - matplotlib==3.5.1 @@ -20,7 +20,6 @@ dependencies: - pygifsicle==1.0.5 - pyopengl==3.1.5 - pyopengl-accelerate==3.1.5 - - stable-baselines3==1.4.0 - torch==1.10.2 - ttkbootstrap==1.5.1 - typing==3.7.4.3