forked from Replicable-MARL/MARLlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Container base image | ||
# PyTorch image with Python 3.9 | ||
ARG BASE_IMAGE="pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime" | ||
FROM ${BASE_IMAGE} | ||
|
||
# Set display variable to enable rendering through system X server. | ||
# Display and rendering only works with running X server. | ||
ENV DISPLAY=host.docker.internal:0.0 | ||
|
||
# Update and upgrade standard stuff | ||
RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y && \ | ||
add-apt-repository -y multiverse && apt-get update -y && apt-get upgrade -y && \ | ||
apt-get install -y apt-utils nano vim man build-essential wget sudo && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN apt-get update -y && apt-get install -y curl libssl-dev openssl libopenblas-dev \ | ||
libhdf5-dev hdf5-helpers hdf5-tools libhdf5-serial-dev libprotobuf-dev protobuf-compiler git | ||
|
||
# Enable opengl to show OpenGL based rendering of environments | ||
RUN apt-get update -y && apt-get install -y python-opengl | ||
|
||
# Install GPUtil for GPU system monitoring via ray | ||
RUN pip install GPUtil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu | ||
{ | ||
"name": "dev-container-MARLlib", | ||
|
||
// Use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"build": { | ||
// Path is relative to the devcontainer.json file. | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
// An array of Docker CLI arguments that should be used when running the container | ||
"runArgs": [ | ||
// Use available GPUs | ||
"--gpus","all", | ||
"--shm-size","16gb" //Make sure to set this to more than 30% of available RAM. | ||
], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "bash ./.devcontainer/postCreateCommand.sh", | ||
|
||
// Connect as root. More info: https://aka.ms/dev-containers-non-root. | ||
"remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Install MARLlib as editable python package | ||
cd /workspaces/MARLlib && pip install -e . | ||
pip install protobuf==3.20 | ||
pip install pytest pytest-cov |