@@ -474,6 +474,62 @@ jobs:
474
474
- store_test_results :
475
475
path : test-results
476
476
477
+ unittest_linux_d4rl_gpu :
478
+ << : *binary_common
479
+ machine :
480
+ image : ubuntu-2004-cuda-11.4:202110-01
481
+ resource_class : gpu.nvidia.medium
482
+ environment :
483
+ image_name : " nvidia/cudagl:11.4.0-base"
484
+ TAR_OPTIONS : --no-same-owner
485
+ PYTHON_VERSION : << parameters.python_version >>
486
+ CU_VERSION : << parameters.cu_version >>
487
+
488
+ steps :
489
+ - checkout
490
+ - designate_upload_channel
491
+ - run :
492
+ name : Generate cache key
493
+ # This will refresh cache on Sundays, nightly build should generate new cache.
494
+ command : echo "$(date +"%Y-%U")" > .circleci-weekly
495
+ - restore_cache :
496
+ keys :
497
+ - env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux_libs/scripts_d4rl/environment.yml" }}-{{ checksum ".circleci-weekly" }}
498
+ - run :
499
+ name : Setup
500
+ command : docker run -e PYTHON_VERSION -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux_libs/scripts_d4rl/setup_env.sh
501
+ - save_cache :
502
+
503
+ key : env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux_libs/scripts_d4rl/environment.yml" }}-{{ checksum ".circleci-weekly" }}
504
+
505
+ paths :
506
+ - conda
507
+ - env
508
+ - run :
509
+ # Here we create an envlist file that contains some env variables that we want the docker container to be aware of.
510
+ # Normally, the CIRCLECI variable is set and available on all CI workflows: https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables.
511
+ # They're available in all the other workflows (OSX and Windows).
512
+ # But here, we're running the unittest_linux_gpu workflows in a docker container, where those variables aren't accessible.
513
+ # So instead we dump the variables we need in env.list and we pass that file when invoking "docker run".
514
+ name : export CIRCLECI env var
515
+ command : echo "CIRCLECI=true" >> ./env.list
516
+ - run :
517
+ name : Install torchrl
518
+ command : docker run -e PYTHON_VERSION -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux_libs/scripts_d4rl/install.sh
519
+ - run :
520
+ name : Run tests
521
+ command : docker run --env-file ./env.list -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux_libs/scripts_d4rl/run_test.sh
522
+ - run :
523
+ name : Codecov upload
524
+ command : |
525
+ bash <(curl -s https://codecov.io/bash) -Z -F d4rl-gpu
526
+ - run :
527
+ name : Post Process
528
+ command : docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux_libs/scripts_d4rl/post_process.sh
529
+ - store_test_results :
530
+ path : test-results
531
+
532
+
477
533
unittest_linux_jumanji_gpu :
478
534
<< : *binary_common
479
535
machine :
@@ -1223,6 +1279,10 @@ workflows:
1223
1279
cu_version : cu117
1224
1280
name : unittest_linux_habitat_gpu_py3.8
1225
1281
python_version : ' 3.8'
1282
+ # - unittest_linux_d4rl_gpu:
1283
+ # cu_version: cu117
1284
+ # name: unittest_linux_d4rl_gpu_py3.8
1285
+ # python_version: '3.8'
1226
1286
- unittest_linux_jumanji_gpu :
1227
1287
cu_version : cu117
1228
1288
name : unittest_linux_jumanji_gpu_py3.8
0 commit comments