curl https://get.docker.com | sh \
&& sudo systemctl --now enable docker
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
Ctrl + Shift + P
(Windows) or CMD + Shift + P
(Mac) to open editor commandsDev Containers: Reopen in Container
docker build -t openthai-gpt && docker run --gpus all openthai-gpt <command>
pip install -r requirements.txt
pre-commit install
pip install -e ./src/core
pip install -e ./src/<module_name>
pip install -e ./src/data
pip install -e ./src/model
pip install -e ./src/evaluation
To Run Tests on Development Environment
pytest tests/data
pytest tests/model
pytest tests/evaluation
pytest tests/core