We provide a Dockerfile to simplify the environment setup. Please install docker
and nvidia-docker
first by checking URL and URL2.
In ubuntu, simply:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
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/stable/deb/nvidia-container-toolkit.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
After installing docker and nvidia-docker, build the Docker image by running the following command in the dockerfiles
directory:
cd dockerfiles
sudo docker build -f Dockerfile.frugal --build-arg uid=$UID -t frugal .
cd -
And then start this container, by running the following commands. Please modify corresponding pathes below.
sudo docker run --cap-add=SYS_ADMIN --privileged --security-opt seccomp=unconfined --runtime=nvidia --name frugal --net=host -v /home/xieminhui/Frugal:/home/xieminhui/Frugal -v /dev/shm:/dev/shm -v /dev/hugepages:/dev/hugepages -v /home/xieminhui/FrugalDataset:/home/xieminhui/FrugalDataset -v /home/xieminhui/dgl-data:/home/xieminhui/dgl-data -v /dev:/dev -w /home/xieminhui/Frugal --rm -it --gpus all -d frugal
or
cd dockerfiles && bash start_docker.sh && cd -
Enter the container.
sudo docker exec -it frugal /bin/bash
We provide a script for one-click environment initialization. Simply run the following command in the docker to set up the environment:
(inside docker) cd dockerfiles
(inside docker) bash init_env_inside_docker.sh
(inside docker) mkdir build
(inside docker) cd build
(inside docker) cmake .. -DCMAKE_BUILD_TYPE=Release
All experiments are consolidated into a single script located at src/kg/scripts/bench.py
.
Simply run the script to execute all experiments:
(inside docker) cd src/kg/scripts/
(inside docker) python bench.py
The logs for all experiments will be generated in the log
folder at the project root.
All experiments' configurations can be checked at src/kg/scripts/exp_config.py
.
We provide three Python notebooks (.ipynb): ae-micro.ipynb
, ae-graph.ipynb
, and ae-rec.ipynb
, which generate all the experimental plots for the microbenchmark, Knowledge Graph (KG), and Recommendation (REC) experiments, respectively.
They are located at draw_figures
directory.
All figures and their corresponding raw data tables are plotted within each notebook, with the experiment numbering consistent with that used in the paper (in the form of Exp#7).
Please install the Jupyter extension in VSCode. Then, please directly open three notebooks in the `draw_figures` directory.
@inproceedings{xie2025frugal,
title={Frugal: Efficient and Economic Embedding Model Training with Commodity GPUs},
author={Xie, Minhui and Zeng, Shaoxun and Guo, Hao and Gao, Shiwei and Lu, Youyou},
booktitle={Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1},
pages={509--523},
year={2025}
}
If you have any questions, feel free to email me at xieminhui AT ruc.edu.cn
.