Skip to content

cookieSensei/14daybootcamp

Repository files navigation

AI Lab Docker Environment

This repository provides a GPU-enabled Docker environment containing multiple isolated Python environments for different AI workflows.

The container is based on CUDA 12.1 + Ubuntu 22.04 and includes environments for:

  • TensorFlow research
  • PyTorch deep learning
  • Data science workflows
  • Resume OCR + ATS scoring with Transformers

Environments Overview

The container contains four virtual environments located in:

/opt/envs/
Environment Path Purpose
TensorFlow /opt/envs/tf TensorFlow experiments and research
PyTorch /opt/envs/torch Deep learning, computer vision, YOLO
Data Science /opt/envs/ds Classical ML and analytics
ATS Resume AI /opt/envs/ats OCR, NLP, resume parsing, ATS scoring

Build the Docker Image

Run the following command from the project directory:

docker build -t ai-lab:latest .

Run the Container

To start the container with GPU support:

docker run -it --gpus all \
-v $(pwd):/workspace \
ai-lab:latest

This mounts your current project folder to /workspace inside the container.


Activating Python Environments

Each environment can be activated manually using source.


TensorFlow Environment

Activate:

source /opt/envs/tf/bin/activate

Verify:

python -c "import tensorflow as tf; print(tf.__version__)"

Deactivate:

deactivate

PyTorch Environment

Activate:

source /opt/envs/torch/bin/activate

Verify GPU:

python -c "import torch; print(torch.cuda.is_available())"

Deactivate:

deactivate

Data Science Environment

Activate:

source /opt/envs/ds/bin/activate

Test:

python -c "import pandas, sklearn, xgboost"

Deactivate:

deactivate

ATS Resume AI Environment

This environment is designed for:

  • Resume OCR
  • EasyOCR
  • Transformers
  • Sentence embeddings
  • ATS scoring

Activate:

source /opt/envs/ats/bin/activate

Test OCR:

python -c "import easyocr; print('EasyOCR ready')"

Deactivate:

deactivate

Running Python Without Activating

You can also directly call Python from an environment:

/opt/envs/torch/bin/python script.py

Example:

/opt/envs/ats/bin/python resume_parser.py

Available Jupyter Kernels

If using JupyterLab inside the container, the following kernels are available:

  • Python (TensorFlow)
  • Python (PyTorch)
  • Python (Data Science)
  • Python (ATS Resume AI)

Start JupyterLab:

/opt/envs/ds/bin/jupyter lab --ip=0.0.0.0 --port=8888 --allow-root

Workspace Directory

The container uses:

/workspace

as the main working directory.

Any files in your host project directory will appear here inside the container.


GPU Support

The container supports CUDA-enabled GPUs.

Verify inside the container:

nvidia-smi

or:

python -c "import torch; print(torch.cuda.is_available())"

Included Technologies

The container includes support for:

  • TensorFlow
  • PyTorch
  • HuggingFace Transformers
  • Sentence Transformers
  • EasyOCR
  • Tesseract OCR
  • OpenCV
  • YOLOv8
  • Streamlit / Gradio / FastAPI
  • Pandas / Scikit-learn / XGBoost
  • JupyterLab

🌐 Running Streamlit Apps

The container supports running Streamlit applications for building interactive ML demos.


▶️ Run a Streamlit App

Activate the desired environment (example: Data Science):

source /opt/envs/ds/bin/activate

Run the app:

streamlit run app.py --server.address 0.0.0.0 --server.port 8501

🌍 Access the App

  • Local:

    http://localhost:8501
    
  • Remote (Coder / VM / Cloud):

    • Forward port 8501
    • Open the forwarded URL

⚠️ Notes

  • 0.0.0.0 is required for Docker/remote environments
  • Default port is 8501
  • Change port if needed:
streamlit run app.py --server.address 0.0.0.0 --server.port 8080

📜 License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages