Skip to content

Commit

Permalink
Add devcontainer config
Browse files Browse the repository at this point in the history
  • Loading branch information
luisquintanilla committed Jul 30, 2024
1 parent b314569 commit 122152b
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .devcontainer/base/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Install .NET Aspire Workload
# See documentation for more details
# https://learn.microsoft.com/dotnet/aspire/fundamentals/setup-tooling?tabs=linux&pivots=vscode
if command -v dotnet &> /dev/null
then
echo "dotnet is installed."

# Specify the workload you want to install
WORKLOAD="aspire"

# Update workloads
sudo dotnet workload update

# Install the workload
sudo dotnet workload install $WORKLOAD

echo "Workload '$WORKLOAD' has been installed."
else
echo "dotnet is not installed. Please install dotnet first."
fi

# Download data files for examples
#!/bin/bash

# URL of the file to download
FILE_URL="https://arxiv.org/pdf/1706.03762"

# Directory where you want to place the downloaded file
TARGET_DIR="./samples/data"

# Name of the file after downloading
FILE_NAME="attention-is-all-you-need.pdf"

# Create the target directory if it doesn't exist
mkdir -p $TARGET_DIR

# Download the file and place it in the target directory
curl -o $TARGET_DIR/$FILE_NAME $FILE_URL

echo "File downloaded to $TARGET_DIR/$FILE_NAME"
22 changes: 22 additions & 0 deletions .devcontainer/base/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "LlamaParse .NET DevContainer",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "8.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode-remote.vscode-remote-extensionpack",
"ms-azuretools.vscode-docker",
"ms-dotnettools.csharp",
"ms-dotnettools.dotnet-interactive-vscode"
]
}
},
"postCreateCommand": "./.devcontainer/base/configure.sh"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,6 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml

# Don't commit samples data files
/samples/data/*

0 comments on commit 122152b

Please sign in to comment.