Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,416 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@calderjo ya está trabajando en esto.

Desde el 2/10/2024.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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! 😄😄

Lenguaje dominante
Python
Estrellas
2.7k
Forks
1k
Merge medio
5 h 55 min
PR fusionados (30 d)
1

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Kaggle/docker-python

Todos los issues de Kaggle/docker-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.