Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Efficiently Setting Up Dependencies for Karpathy's llm.c on Kaggle: Seeking Guidance

未关闭
#1,416 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@calderjo 已经在做这个了。

开始于 2024年10月2日。

评估

这个 Issue 还没有评估数据。

描述

new-package

Hello Kaggle! 😊

I wasn't sure where the best place to ask something like this was, so I hope it's okay to open this GitHub issue.

Objective

I want to compile and run Andrej Karpathy’s code from this repository.

Requirements

To achieve this, I need to install the following dependencies:

sudo apt-get -y install nvidia-cuda-toolkit
sudo apt install libnccl2 libnccl-dev
sudo apt-get update
sudo apt-get install libnvtoolsext1
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install nvidia-cuda-toolkit  
sudo apt-get -y install libcudnn9-dev-cuda-12
sudo apt install libnccl2 libnccl-dev
pip install tiktoken  # This is used to tokenize the data to be passed into llm.c

Additionally, the instructions specify that I need to clone this repository into my home directory.

Dockerfile Concerns

I have looked into adding the above dependencies into the Dockerfile.tmpl, but I found the following lines in there:

# Make sure we are on the right version of CUDA
RUN update-alternatives --set cuda /usr/local/cuda-$CUDA_MAJOR_VERSION.$CUDA_MINOR_VERSION
# NVIDIA binaries from the host are mounted to /opt/bin.
ENV PATH=/opt/bin:${PATH}

It seems like the convention is NOT to use apt-get install here. Am I able to install the above dependencies (e.g., nvidia-cuda-toolkit, etc.) in this Dockerfile? What are your thoughts?

Current Issue

At the moment, I have to install all the dependencies each time I start up the notebook, which is incredibly slow and tedious, as you can imagine.

Compilation Method

I am using a method similar to this notebook to compile and run Karpathy’s code.

Thanks!

Thank you so much for Kaggle! 😄😄

主要语言
Python
星标
2.7k
派生
1k
平均合并
5 小时 55 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Kaggle/docker-python 的其他 Issue

查看 Kaggle/docker-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。