|
206 | 206 | "end_time": "2023-10-04T12:52:26.115543Z" |
207 | 207 | } |
208 | 208 | }, |
209 | | - "source": [ |
210 | | - "# -----------------\n", |
211 | | - "# This code is used to close an env that might not have been closed before\n", |
212 | | - "try:\n", |
213 | | - " env.close()\n", |
214 | | - "except:\n", |
215 | | - " pass\n", |
216 | | - "# -----------------\n", |
217 | | - "\n", |
218 | | - "from mlagents_envs.registry import default_registry\n", |
219 | | - "\n", |
220 | | - "env = default_registry[env_id].make(no_graphics=True)" |
221 | | - ], |
222 | | - "execution_count": 3, |
223 | | - "outputs": [ |
224 | | - { |
225 | | - "name": "stdout", |
226 | | - "output_type": "stream", |
227 | | - "text": [ |
228 | | - "[UnityMemory] Configuration Parameters - Can be set up in boot.config\n", |
229 | | - " \"memorysetup-bucket-allocator-granularity=16\"\n", |
230 | | - " \"memorysetup-bucket-allocator-bucket-count=8\"\n", |
231 | | - " \"memorysetup-bucket-allocator-block-size=4194304\"\n", |
232 | | - " \"memorysetup-bucket-allocator-block-count=1\"\n", |
233 | | - " \"memorysetup-main-allocator-block-size=16777216\"\n", |
234 | | - " \"memorysetup-thread-allocator-block-size=16777216\"\n", |
235 | | - " \"memorysetup-gfx-main-allocator-block-size=16777216\"\n", |
236 | | - " \"memorysetup-gfx-thread-allocator-block-size=16777216\"\n", |
237 | | - " \"memorysetup-cache-allocator-block-size=4194304\"\n", |
238 | | - " \"memorysetup-typetree-allocator-block-size=2097152\"\n", |
239 | | - " \"memorysetup-profiler-bucket-allocator-granularity=16\"\n", |
240 | | - " \"memorysetup-profiler-bucket-allocator-bucket-count=8\"\n", |
241 | | - " \"memorysetup-profiler-bucket-allocator-block-size=4194304\"\n", |
242 | | - " \"memorysetup-profiler-bucket-allocator-block-count=1\"\n", |
243 | | - " \"memorysetup-profiler-allocator-block-size=16777216\"\n", |
244 | | - " \"memorysetup-profiler-editor-allocator-block-size=1048576\"\n", |
245 | | - " \"memorysetup-temp-allocator-size-main=4194304\"\n", |
246 | | - " \"memorysetup-job-temp-allocator-block-size=2097152\"\n", |
247 | | - " \"memorysetup-job-temp-allocator-block-size-background=1048576\"\n", |
248 | | - " \"memorysetup-job-temp-allocator-reduction-small-platforms=262144\"\n", |
249 | | - " \"memorysetup-allocator-temp-initial-block-size-main=262144\"\n", |
250 | | - " \"memorysetup-allocator-temp-initial-block-size-worker=262144\"\n", |
251 | | - " \"memorysetup-temp-allocator-size-background-worker=32768\"\n", |
252 | | - " \"memorysetup-temp-allocator-size-job-worker=262144\"\n", |
253 | | - " \"memorysetup-temp-allocator-size-preload-manager=262144\"\n", |
254 | | - " \"memorysetup-temp-allocator-size-nav-mesh-worker=65536\"\n", |
255 | | - " \"memorysetup-temp-allocator-size-audio-worker=65536\"\n", |
256 | | - " \"memorysetup-temp-allocator-size-cloud-worker=32768\"\n", |
257 | | - " \"memorysetup-temp-allocator-size-gfx=262144\"\n" |
258 | | - ] |
259 | | - } |
260 | | - ] |
| 209 | + "source": "# -----------------\n# This code is used to close an env that might not have been closed before\ntry:\n env.close()\nexcept:\n pass\n# -----------------\n\nimport os\nfrom mlagents_envs.registry import default_registry\n\n# Set Unity to use software rendering for headless environment\nos.environ[\"UNITY_FORCE_SOFTWARE_RENDERING\"] = \"1\" \nos.environ[\"DISPLAY\"] = \":1\" # Make sure XVFB display is set\n\nenv = default_registry[env_id].make()", |
| 210 | + "execution_count": null, |
| 211 | + "outputs": [] |
261 | 212 | }, |
262 | 213 | { |
263 | 214 | "cell_type": "markdown", |
|
0 commit comments