From aef691933f0f54c6bbdad6edee616486caf67518 Mon Sep 17 00:00:00 2001 From: Christopher Harris Date: Mon, 10 Apr 2023 11:39:38 -0500 Subject: [PATCH] add git-lfs and gh config dir (#273) closes #270 and #267 Authors: - Christopher Harris (https://github.com/cwharris) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) URL: https://github.com/nv-morpheus/MRC/pull/273 --- .devcontainer/devcontainer.json | 18 ++++++++++++++++++ .devcontainer/init.sh | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .devcontainer/init.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 704e4519b..f5244494a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,17 @@ +// SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. { "build": { "args": { @@ -36,6 +50,7 @@ "hostRequirements": { "gpu": true }, + "initializeCommand": [ "./.devcontainer/init.sh" ], "mounts": [ // Mount the necessary files for GDB pretty-printing to work "source=${localWorkspaceFolder}/.devcontainer/home/.gdbinit,target=/home/${localEnv:USER}/.gdbinit,type=bind", @@ -43,6 +58,9 @@ // Mount the Github CLI config directory to allow using the Github CLI "source=${localEnv:HOME}/.config/gh,target=/home/${localEnv:USER}/.config/gh,type=bind", ], + "features": { + "ghcr.io/devcontainers/features/git-lfs": {} + }, "name": "mrc-dev", "overrideCommand": true, // infinite loop of sleeps, "remoteUser": "${localEnv:USER}", diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh new file mode 100644 index 000000000..abb8593c0 --- /dev/null +++ b/.devcontainer/init.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# create the github config directory if it does not exist so it's found when mounting +mkdir -p ~/.config/gh