Sign inSign up

hkarhani/fsnb

By hkarhani

โ€ขUpdated 6 months ago

FSNB

Image
0

1.4K

hkarhani/fsnb repository overview

โ FSNB โ€“ FS Notebook Environment (Docker + JupyterLab)

FSNB provides a ready-to-use, containerized JupyterLab environment tailored for automation, analytics, and network/security tooling.

It is built on top of the official Jupyter Docker Stacks and extended with additional libraries and tools required for FS integrations, scripting, and data workflows.


โ ๐Ÿš€ Features

  • ๐Ÿง  JupyterLab (modern UI) instead of classic notebook
  • ๐Ÿณ Fully containerized via Docker / Docker Compose
  • ๐Ÿ” Live code sync via bind-mounted volumes
  • ๐Ÿ“ฆ Pre-installed Python libraries for automation & analytics
  • ๐Ÿ” Secure, configurable runtime (token-based access)
  • โšก Compatible with Docker Hub auto-build pipelines

โ ๐Ÿ“ฆ Included Capabilities

  • Data & analytics: pandas, numpy, matplotlib
  • Automation & APIs: requests, paramiko, pysnmp
  • Notebook workflows: papermill, nbconvert, ipywidgets
  • Dev tooling: pytest, black
  • File handling: openpyxl, Pillow
  • Diagramming: diagrams
  • Perl support via IPerl kernel

โ ๐Ÿ›  Requirements

  • Docker (>= 20.x)
  • Docker Compose (v2 recommended)

โ โ–ถ๏ธ Quick Start

โ 1. Clone the repository
git clone https://github.com/hkarhani/FSNB.git
cd FSNB

โ 2. Build and run
docker compose up --build

โ 3. Access JupyterLab

Open your browser:

http://localhost:9091/lab

โ ๐Ÿ“ Project Structure

FSNB/
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yaml
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ notebooks/ (your working directory)

โ ๐Ÿ”„ Development Workflow

โ Live editing (no rebuild needed)

All local files are mounted into the container:

volumes:
  - ./:/notebooks

๐Ÿ‘‰ Any change you make locally is instantly available inside JupyterLab.


โ When to rebuild

Rebuild the container only when:

  • requirements.txt changes
  • system dependencies change
  • Dockerfile is updated
docker compose build --no-cache
docker compose up

โ ๐Ÿ” Configuration

You can configure runtime behavior via environment variables.

โ Example .env
JUPYTER_TOKEN=your_secure_token
JUPYTER_PORT=8888

โ ๐Ÿงช Running in Detached Mode

docker compose up -d

Stop:

docker compose down

โ ๐Ÿงน Cleanup

Remove unused images and cache:

docker system prune -f

โ ๐Ÿ“Œ Notes

  • JupyterLab is used as the default interface
  • The container runs as a non-root user (secure by default)
  • Base image comes from Jupyter Docker Stacks (Quay.io)

โ โš ๏ธ Best Practices

  • Do NOT blindly update all Python packages in production
  • Pin dependencies after stable builds
  • Avoid using latest tags long-term (pin versions for stability)
  • Backup important notebooks before rebuilding

โ ๐Ÿ”ง Troubleshooting

โ Port already in use

Change port in docker-compose.yaml:

ports:
  - "9092:8888"

โ Container not starting
docker compose logs -f

โ Permission issues
chmod -R 755 .

โ ๐Ÿ“ˆ Future Improvements

  • Multi-profile setup (dev vs prod)
  • GPU-enabled builds
  • Automated CI/CD pipeline for image validation
  • Pre-configured Automation environments

โ ๐Ÿค Contributing

Pull requests are welcome. For major changes, please open an issue first.


โ ๐Ÿ“œ License

MIT License


โ ๐Ÿ‘ค Author

Hassan El Karhani https://github.com/hkarhaniโ 

Tag summary

Content type

Image

Digest

sha256:216b5f1a1โ€ฆ

Size

648.5 MB

Last updated

6 months ago

docker pull hkarhani/fsnb