Skip to content

Commit 7e51dd3

Browse files
feat: Enhance install script for ODBC Driver installation on Debian/Ubuntu
1 parent 6465691 commit 7e51dd3

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

infra/vscode_web/install.sh

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
#!/bin/bash
2+
3+
# Install ODBC Driver 17 for SQL Server
4+
echo "Installing ODBC Driver 17 for SQL Server..."
5+
6+
# Check if running on Debian/Ubuntu
7+
if [ -f /etc/debian_version ]; then
8+
# Add Microsoft repository
9+
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
10+
11+
# Detect Ubuntu version
12+
if command -v lsb_release &> /dev/null; then
13+
DISTRO_VERSION=$(lsb_release -rs)
14+
curl https://packages.microsoft.com/config/ubuntu/${DISTRO_VERSION}/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
15+
else
16+
# Default to Ubuntu 22.04 if unable to detect
17+
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
18+
fi
19+
20+
# Update package list
21+
sudo apt-get update
22+
23+
# Install ODBC Driver 17 for SQL Server
24+
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
25+
26+
# Install unixODBC development headers
27+
sudo apt-get install -y unixodbc-dev
28+
29+
echo "ODBC Driver 17 for SQL Server installed successfully."
30+
else
31+
echo "Warning: Unsupported distribution. ODBC Driver installation skipped."
32+
fi
33+
34+
# Install Python requirements
35+
echo "Installing Python requirements..."
136
pip install -r requirements.txt --user -q
237

3-
azd init -t microsoft/Conversation-Knowledge-Mining-Solution-Accelerator
38+
# Initialize Azure Developer CLI template
39+
echo "Initializing Azure Developer CLI template..."
40+
azd init -t microsoft/Conversation-Knowledge-Mining-Solution-Accelerator -b pk-km-sampledata-manual

0 commit comments

Comments
 (0)