Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA Support #113

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@ LABEL "repository"="http://github.com/webbertakken/unity-actions"
LABEL "homepage"="http://github.com/webbertakken/unity-actions"
LABEL "maintainer"="Webber Takken <[email protected]>"

# Dependencies for glvnd and X11.
RUN apt-get update \
&& apt-get install -y -qq --no-install-recommends \
libglvnd0 \
libgl1 \
libglx0 \
libegl1 \
libxext6 \
libx11-6 \
&& rm -rf /var/lib/apt/lists/*
# Env vars for the nvidia-container-runtime.
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute

ADD steps /steps
RUN chmod -R +x /steps
ADD entrypoint.sh /entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion action/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions action/steps/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if [ $EDIT_MODE = true ]; then
echo "# Testing in EditMode #"
echo "###########################"
echo ""
unity-editor \
/opt/unity/Editor/Unity \
-batchmode \
-logFile "$FULL_ARTIFACTS_PATH/editmode.log" \
-projectPath "$UNITY_PROJECT_PATH" \
Expand Down Expand Up @@ -111,7 +111,7 @@ if [ $PLAY_MODE = true ]; then
echo "# Testing in PlayMode #"
echo "###########################"
echo ""
unity-editor \
/opt/unity/Editor/Unity \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using the alias on purpose - it has compatibility fixes and environment context.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. But the alias is using some commands that restrict me from using nvidia-docker.

-batchmode \
-logFile "$FULL_ARTIFACTS_PATH/playmode.log" \
-projectPath "$UNITY_PROJECT_PATH" \
Expand Down