-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINIT.sh
30 lines (24 loc) · 1.04 KB
/
INIT.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Check if Miniconda is installed
if ! command -v conda &> /dev/null; then
# If Miniconda is not installed, download and install it
echo "Miniconda is not installed. Installing Miniconda..."
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
rm miniconda.sh
export PATH="$HOME/miniconda/bin:$PATH"
fi
# Create and activate the Conda environment
echo "Creating and activating the 'tupi-env' Conda environment..."
conda create -n tupi-env python=3.10
conda activate tupi-env
# Install Poetry inside the Conda environment
echo "Installing Poetry inside 'tupi-env'..."
conda install -c conda-forge poetry
# Run 'poetry install' inside the Conda environment
echo "Running 'poetry install' inside 'tupi-env'..."
poetry install
# Use Poetry to run Python command to download NLTK files for Portuguese stopwords
echo "Downloading NLTK files for Portuguese stopwords..."
poetry run python -m nltk.downloader stopwords
echo "Installation complete."