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

[hma] Install extensions in devcontainer #1637

Merged
merged 1 commit into from
Oct 2, 2024
Merged
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
2 changes: 1 addition & 1 deletion hasher-matcher-actioner/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
}
},
"remoteUser": "vscode",
"postCreateCommand": "pip install --editable .[all]",
"mounts": [
"source=python-threatexchange-cmdhistory,target=/commandhistory,type=volume",
"source=${localEnv:HOME}${localEnv:USERPROFILE},target=/host-home-folder,type=bind,consistency=cached"
],
"postCreateCommand": "/workspace/.devcontainer/postcreate.sh",
"postAttachCommand": "/workspace/.devcontainer/startup.sh"
}
11 changes: 11 additions & 0 deletions hasher-matcher-actioner/.devcontainer/postcreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

pip install --editable .[all]

# Find Python packages in opt and install them
for setup_script in "$(find /workspace/opt -name setup.py)"
do
module_dir="$(dirname "$setup_script")"
pip install --editable "$module_dir"
done
1 change: 1 addition & 0 deletions hasher-matcher-actioner/extensions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
3 changes: 3 additions & 0 deletions hasher-matcher-actioner/extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Optional Packages

Drop any Python packages here which you need to be installed to the container but which can not be added to the `pyproject.toml`, e.g. proprietary extensions.
Loading