Skip to content

albrtyng/fastai-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FastAI Docker Environment for Local GPU

This Docker container provides a minimal environment for running FastAI course notebooks with local NVIDIA GPU support. It's specifically tested with the NVIDIA RTX 5070 Ti (sm120).

Prerequisites

  • Docker installed on your system
  • NVIDIA GPU drivers installed
  • NVIDIA Container Toolkit (nvidia-docker2)

Features

  • Minimal base image to reduce container size
  • CUDA support for GPU acceleration
  • Jupyter Lab environment
  • FastAI library and dependencies
  • Python 3.x environment

Quick Start

  1. Using the docker compose (recommended):
docker-compose up --build
  1. Or manually build and run:
docker volume create fastai-notebooks
docker build -t fastai-local-v2 .
  1. Run the container:
docker run --gpus all -p 8888:8888 -v fastai-notebooks:/home/jupyter/ fastai-local-v2

This will:

  • Enable GPU access with --gpus all
  • Map port 8888 for Jupyter Lab access
  • Mount current directory to /workspace in container

Accessing Notebooks

Once the container is running:

  1. Open your browser to http://localhost:8888
  2. The Jupyter Lab interface will load with access to your notebooks
  3. Any notebooks in your current directory will be available in the /workspace folder

GPU Verification

To verify GPU access inside the container, you can run:

import torch
print(torch.cuda.is_available())
print(torch.cuda.get_device_name())

Notes

  • This container is optimized for the NVIDIA RTX 5070 Ti with Compute Capability 12.0
  • Adjust CUDA version in Dockerfile if using different GPU models
  • Container includes minimal dependencies to reduce size and build time

License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors