-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
…irectory for Docker.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
class Vivaria < Formula | ||
include Language::Python::Virtualenv | ||
desc "Task environment setup tool for AI research" | ||
# AUTHORS: METR <[email protected]> | ||
homepage "https://vivaria.metr.org/" | ||
url "https://github.com/GatlenCulp/vivaria/archive/refs/tags/v0.1.2.tar.gz"#, tag: "v0.1.0" | ||
|
||
# url "https://github.com/GatlenCulp/vivaria/archive/refs/tags/v0.1.2.tar.gz"#, tag: "v0.1.0" | ||
# sha256 "2ad566ffd8836670dd5a5639b8f30efbbedf0fb76d250315aae9b38085188042" | ||
|
||
# Need this for .git directory to be included in the installation | ||
url "https://github.com/GatlenCulp/vivaria.git", | ||
using: :git, | ||
Check failure on line 11 in Formula/vivaria.rb
|
||
tag: "v0.1.2" | ||
Check failure on line 12 in Formula/vivaria.rb
|
||
# revision: "abcdef1234567890abcdef1234567890abcdef12" | ||
Check failure on line 13 in Formula/vivaria.rb
|
||
|
||
Check failure on line 14 in Formula/vivaria.rb
|
||
version "0.1.0" # TODO: Grab the version from the tag(?) | ||
sha256 "2ad566ffd8836670dd5a5639b8f30efbbedf0fb76d250315aae9b38085188042" | ||
license "MIT" | ||
head "https://github.com/METR/vivaria.git", branch: "main" | ||
|
||
|
@@ -91,6 +98,7 @@ class Vivaria < Formula | |
sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9" | ||
end | ||
|
||
|
||
Check failure on line 101 in Formula/vivaria.rb
|
||
def install | ||
# Install dependencies and the CLI in a virtualenv | ||
venv = virtualenv_create(libexec/"venv", "python3.11") | ||
|
@@ -101,15 +109,15 @@ def install | |
bin.install libexec / "venv/bin/viv" | ||
bin.install "scripts/setup-docker-compose.sh" => "viv-setup-docker" | ||
bin.install "scripts/configure-cli-for-docker-compose.sh" => "viv-setup-cli" | ||
|
||
Check failure on line 112 in Formula/vivaria.rb
|
||
# Install everything in docs as well as the README, CHANGELOG, LICENSE, and CONTRIBUTING | ||
doc.install Dir["docs/*"] | ||
doc.install "README.md" | ||
doc.install "LICENSE" | ||
doc.install "CONTRIBUTING.md" | ||
|
||
Check failure on line 118 in Formula/vivaria.rb
|
||
# Setup script that combines the two and sets up the environment | ||
|
||
Check failure on line 120 in Formula/vivaria.rb
|
||
# Clean up unnecessary directories | ||
rm_rf ".devcontainer" | ||
rm_rf ".github" | ||
|
@@ -122,10 +130,6 @@ def install | |
src_dir = prefix/"vivaria" | ||
src_dir.mkpath | ||
src_dir.install Dir["*", ".*"].reject { |f| ['.', '..'].include?(File.basename(f)) } | ||
# Include .git directory for development | ||
src_dir.install ".git" | ||
# prefix.install Dir["*"] | ||
# prefix.install Dir[".*"].select { |f| File.file?(f) } | ||
|
||
# Make viv-docker command available which sends commands to docker | ||
|
||
|
@@ -134,8 +138,8 @@ def install | |
|
||
def post_install | ||
# This is helpful for using brew api postinstall and making on-the-fly changes | ||
|
||
src_dir.install buildpath / ".git" | ||
# src_dir = prefix / "vivaria" | ||
# src_dir.install buildpath / ".git" | ||
|
||
# Run with brew postinstall vivaria | ||
# Idk if this is the best way to do this but it works for now. | ||
|