Skip to content

Commit

Permalink
chore(release): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
HQarroum committed Feb 7, 2024
0 parents commit 772132e
Show file tree
Hide file tree
Showing 1,164 changed files with 129,274 additions and 0 deletions.
120 changes: 120 additions & 0 deletions .cloud9/resize.sh
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
138 changes: 138 additions & 0 deletions .cspell/dictionary.txt
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
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
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
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
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"
}
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.js
*.d.ts
coverage
node_modules
21 changes: 21 additions & 0 deletions .eslintrc.json
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"
}
}
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
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: |
---
Loading

0 comments on commit 772132e

Please sign in to comment.