From bdde284f56e843f3c9f836d49de484cda4917253 Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Wed, 11 Dec 2024 01:39:27 -0800 Subject: [PATCH] Use requirements.txt in .devcontainer/setup.sh PiperOrigin-RevId: 705018082 Change-Id: I95780ce2ba1fd75df755bd0e94a022d9be5a127e --- .devcontainer/devcontainer.json | 2 +- .devcontainer/setup.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 .devcontainer/setup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cc1f7180..bd9cf4ed 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,7 +14,7 @@ // on large machines). "--shm-size=6gb" ], - "postCreateCommand": "pip install --editable .[dev]", + "postCreateCommand": ".devcontainer/setup.sh", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 00000000..e9e08d6e --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Copyright 2024 DeepMind Technologies Limited. +# +# 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 +# +# https://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. +# +# Set up devcontainer +set -e + +python --version +pip --version +pip list + +pip install --no-deps --require-hashes -r requirements.txt +pip install --no-deps --no-index --no-build-isolation --editable . +pip list