Skip to content

Vast.ai implementation #1734

Closed
Closed

Description

@edoproch

Hi!
I wanted to ask if you have a guide for using unsloth on vast, it would be great to be able to use it as I sometimes have memory problems with colab. Even just having a dedicated docker image would be great!
I tried to use it but I always find troubles.

Activity

  1. danielhanchen commented on Feb 23, 2025

    @danielhanchen
    Member

    It should work I think! Most cloud services should function fine

  2. parnox commented on Feb 24, 2025

    @parnox

    I can confirm that I was able to use vast.ai this weekend for 2xGPU training.
    Specifically, I used their PyTorch (cuDNN Devel) template with a 2xV100 instance.

    After spinning it up (1. select template 2. search for instance 3. click RENT) you click the large blue OPEN button to access it via jupyter notebook.
    It also gives you ssh access, if you prefer that.

  3. rolandtannous commented on Jun 6, 2025

    @rolandtannous
    Contributor

    @edoproch

    here is a Dockerfile shared by a community member that should work on vast.ai since you can pull docker containers and use them on docker

    FROM nvidia/cuda:12.9.0-cudnn-devel-ubuntu22.04
    
    RUN mkdir /workspace && cd /workspace
    
    # Set the working directory
    WORKDIR /workspace
    # Mark /app as a volume to be mounted
    VOLUME /workspace
    
    # Install Jupyter Notebook
    RUN apt-get update
    RUN apt-get install -y python3 python3-pip
        
    RUN pip install jupyter -U && pip install jupyterlab
    
    RUN pip install unsloth
    
    # set the token for jupyter
    ENV JUPYTER_TOKEN='unsloth'
    
    # Make port 8888 available to the world outside this container
    EXPOSE 8888
    
    # Run Jupyter Notebook when the container launches
    ENTRYPOINT ["jupyter", "lab","--ip=0.0.0.0","--allow-root"]
    

    you build this as follows:

    docker build -t unsloth_docker .
    

    Push it to a repository like docker hub.
    In vast.ai create a new custom template and specify your docker hub image as source . It should work

    Alternatively you can also pull any image that has cuda and pytorch installed, then manually install conda/mamba or uv, and build your environment from the grounds up once you login to the machine.

    Both should work.

    Will close this for now. Feel free to leave a comment if you're having issues or join us on the discord channel to get help from our collaborators and community members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions