-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 772132e
Showing
1,164 changed files
with
129,274 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
#!/bin/bash | ||
|
||
# Specify the desired volume size in GiB as a command line argument. If not specified, default to 20 GiB. | ||
SIZE=${1:-120} | ||
|
||
# Get the ID of the environment host Amazon EC2 instance. | ||
INSTANCEID=$(curl -m 5 http://169.254.169.254/latest/meta-data/instance-id 2>/dev/null) | ||
REGION=$(curl -s -m 5 http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(.*\)[a-z]/\1/' 2> /dev/null) | ||
|
||
if [ -z "${INSTANCEID}" ]; then | ||
echo "Unable to get the ID of the environment host Amazon EC2 instance." | ||
exit 1; | ||
fi | ||
|
||
if [ -z "${REGION}" ]; then | ||
echo "Unable to get the region of the environment host Amazon EC2 instance." | ||
exit 1; | ||
fi | ||
|
||
echo "" | ||
echo "┌──────────────────────────┐" | ||
echo "| |" | ||
echo "| EBS Volume Resizer |" | ||
echo "| |" | ||
echo "| $INSTANCEID |" | ||
echo "| |" | ||
echo "| $REGION |" | ||
echo "| |" | ||
echo "└──────────────────────────┘" | ||
echo "" | ||
|
||
# List the EBS volumes attached to the instance. | ||
# Get the ID of the Amazon EBS volume associated with the instance. | ||
VOLUMES=$(aws ec2 describe-instances \ | ||
--instance-id "$INSTANCEID" \ | ||
--query "Reservations[0].Instances[0].BlockDeviceMappings[*].Ebs.VolumeId" \ | ||
--output text \ | ||
--region "$REGION") | ||
|
||
# Prompt for the volume to use. | ||
echo "EBS Volumes:" | ||
PS3='Please select the EBS volume to resize (e.g 1) : ' | ||
select VOLUME_ID in $VOLUMES; do | ||
break | ||
done | ||
|
||
# Verifying whether a valid EBS volume was selected. | ||
if [ -z "${VOLUME_ID}" ]; then | ||
echo "The selected volume is invalid."; | ||
exit 1; | ||
fi | ||
|
||
# Prompting for the size in GiB to resize the EBS volume. | ||
read -r -p "Enter new EBS Storage in GiB (e.g '$SIZE') for '$VOLUME_ID': " SIZE | ||
|
||
# Verify whether the input is a number. | ||
if [[ -n ${SIZE//[0-9]/} ]]; then | ||
echo "Invalid input. Enter a valid numerical value." | ||
exit 1 | ||
fi | ||
|
||
# Ensure the new size is superior or equal to 8 GB. | ||
if [ "$SIZE" -lt "8" ]; then | ||
echo "The new size must be superior or equal to 8 GiB." | ||
exit 1 | ||
fi | ||
|
||
# Confirm the input. | ||
read -r -p "Resizing EBS Storage to $SIZE (GiB), continue? (Y/N): " confirm | ||
if [[ $confirm != [yY] && $confirm != [yY][eE][sS] ]]; then | ||
echo "Exiting..." | ||
exit 1 | ||
fi | ||
|
||
# Resize the EBS volume. | ||
echo "Resizing volume $VOLUME_ID to $SIZE GiB..." | ||
if ! aws ec2 modify-volume --volume-id "$VOLUME_ID" --size "$SIZE" 2>&1; then | ||
echo "Failed to modify the volume." | ||
exit 1 | ||
fi | ||
|
||
# Wait for the resize to finish. | ||
while [ \ | ||
"$(aws ec2 describe-volumes-modifications \ | ||
--volume-id "$VOLUME_ID" \ | ||
--filters Name=modification-state,Values="optimizing,completed" \ | ||
--query "length(VolumesModifications)"\ | ||
--output text)" != "1" ]; do | ||
sleep 1 | ||
done | ||
|
||
#Check if we're on an NVMe filesystem | ||
if [[ -e "/dev/xvda" && $(readlink -f /dev/xvda) = "/dev/xvda" ]]; then | ||
# Rewrite the partition table so that the partition takes up all the space that it can. | ||
sudo growpart /dev/xvda 1 | ||
|
||
# Check if we're on AL2 | ||
STR=$(cat /etc/os-release) | ||
SUB="VERSION_ID=\"2\"" | ||
if [[ "$STR" == *"$SUB"* ]] | ||
then | ||
sudo xfs_growfs -d / | ||
else | ||
sudo resize2fs /dev/xvda1 | ||
fi | ||
else | ||
# Rewrite the partition table so that the partition takes up all the space that it can. | ||
sudo growpart /dev/nvme0n1 1 | ||
|
||
# Expand the size of the file system. | ||
# Check if we're on AL2 | ||
STR=$(cat /etc/os-release) | ||
SUB="VERSION_ID=\"2\"" | ||
if [[ "$STR" == *"$SUB"* ]] | ||
then | ||
sudo xfs_growfs -d / | ||
else | ||
sudo resize2fs /dev/nvme0n1p1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
lakechain | ||
astro | ||
astrojs | ||
powertools | ||
pydub | ||
suno | ||
nltk | ||
numba | ||
ndjson | ||
codespaces | ||
quickstart | ||
etag | ||
flac | ||
webm | ||
subrip | ||
runtimes | ||
pandoc | ||
gzipped | ||
untar | ||
grayscale | ||
greyscale | ||
libvips | ||
exif | ||
sshuttle | ||
USEREXAMPLE | ||
specversion | ||
fargate | ||
inferentia | ||
transformative | ||
Tiktoken | ||
langchain | ||
langchain's | ||
vectorizer | ||
keybert | ||
moderations | ||
xlarge | ||
todos | ||
autoscaler | ||
mediainfo | ||
quicktime | ||
msvideo | ||
matroska | ||
eventsources | ||
openxmlformats | ||
officedocument | ||
wordprocessingml | ||
openxmlformats | ||
presentationml | ||
spreadsheetml | ||
epub | ||
opendocument | ||
ipynb | ||
troff | ||
piis | ||
exifr | ||
opensearch | ||
abstractive | ||
sshleifer | ||
distilbart | ||
dailymail | ||
mpnet | ||
hkunlp | ||
intfloat | ||
unflatten | ||
normalise | ||
colourspace | ||
Clahe | ||
bandbool | ||
colourspace | ||
streamz | ||
unzipper | ||
xvda | ||
cuda | ||
userpool | ||
opensearchservice | ||
sigv | ||
kinesisfirehose | ||
amazonopensearchservice | ||
deliverystream | ||
autodrain | ||
KHTML | ||
hnsw | ||
nmslib | ||
faiss | ||
innerproduct | ||
cosinesimil | ||
linf | ||
sdxl | ||
inpainting | ||
dsl | ||
decorrelated | ||
stopwords | ||
opensearchserverless | ||
aoss | ||
timeseries | ||
vectorsearch | ||
redrive | ||
wontfix | ||
libmediainfo | ||
outpainting | ||
dokuwiki | ||
icml | ||
jats | ||
phpextra | ||
markua | ||
texinfo | ||
xwiki | ||
zimwiki | ||
gibibytes | ||
bibtex | ||
fictionbook | ||
docbook | ||
commonmark | ||
csljson | ||
stepfunctions | ||
JMES | ||
jmespath | ||
Celine | ||
pypandoc | ||
pdfminer | ||
huggingface | ||
arxiv | ||
bigbird | ||
uksb | ||
tupboc | ||
panns | ||
pann | ||
webserver | ||
mfccs | ||
cepstral | ||
mailparser | ||
typeof | ||
hailey | ||
outpainted | ||
feedparser | ||
onezone | ||
denoising | ||
synergize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM mcr.microsoft.com/devcontainers/javascript-node:20 | ||
|
||
# This section to install additional OS packages. | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends bash-completion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "Node.js", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"firsttris.vscode-jest-runner", | ||
"amazonwebservices.aws-toolkit-vscode" | ||
], | ||
"vscode": { | ||
"git.enableCommitSigning": true | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "20" | ||
}, | ||
"ghcr.io/devcontainers/features/aws-cli:1": {}, | ||
"ghcr.io/devcontainers-contrib/features/typescript:2": {}, | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
}, | ||
"postCreateCommand": "npm install" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.js | ||
*.d.ts | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"env": { | ||
"es2022": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12 | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Bug Report | ||
description: Report a reproducible bug to help us improve the project | ||
title: 'Bug: TITLE' | ||
labels: ['type/bug', 'triage'] | ||
projects: ['project-lakechain'] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for submitting a bug report. | ||
Please add as much information as possible to help us reproduce, and remove any potential sensitive data. | ||
- type: textarea | ||
id: expected_behaviour | ||
attributes: | ||
label: Expected Behaviour | ||
description: Please share details on the behaviour you expected | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: current_behaviour | ||
attributes: | ||
label: Current Behaviour | ||
description: Please share details on the current issue | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: code_snippet | ||
attributes: | ||
label: Code snippet | ||
description: Please share a code snippet to help us reproduce the issue | ||
placeholder: | | ||
```typescript | ||
some code here | ||
``` | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: Steps to Reproduce | ||
description: Please share how we might be able to reproduce this issue | ||
placeholder: | | ||
1. In this environment... | ||
2. With this config... | ||
3. Run '...' | ||
4. See error... | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: solution | ||
attributes: | ||
label: Possible Solution | ||
description: If known, please suggest a potential resolution | ||
validations: | ||
required: false | ||
- type: input | ||
id: version | ||
attributes: | ||
label: Project Lakechain version | ||
placeholder: 'latest, 1.0.0' | ||
value: latest | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Execution logs | ||
description: If available, please share some logs making sure to remove any sensitive data | ||
render: Shell | ||
validations: | ||
required: false | ||
- type: markdown | ||
attributes: | ||
value: | | ||
--- |
Oops, something went wrong.