Skip to main content

No project description provided

Project description

Dockipy

PyPI - Version PyPI - Python Version

Table of Contents


Installation

pip install dockipy

What is dockipy?

dockipy is your ticket to productivity paradise, a simple yet mighty wrapper around the Docker command line interface. It's the friend who says, "Don't worry about the nitty-gritty, I got you!" Just lean back and let dockipy work its magic, it will mount you project in a container seamlessly. If it doesn't break then everything should be fine.

And here's the cherry on top: with dockipy, you can dive into a Python virtual environment inside your container. It's like a containerception—codeception—whatever you want to call it! Run your code with the ease, all thanks to dockipy.

But wait, there's a catch! Before you sail into the dockipy, make sure you have Docker installed. And if you're planning to use NVIDIA GPUs, brace yourself! Docker GPU driver installation is a mess, dockipy won't hold your hand through that chaos—consider yourself warned!

How to Use dockipy

Ready to embark on your container adventure? Here's how dockipy can make your coding dreams come true:

Run Your Code: Use dockipy to run your code in a container inside a Python virtual environment within another container. It's like Inception, but for coding!

dockipy my_script.py

How to Use dockishell

Need to run an arbitrary command in a container? No problem! Just fire up dockishell and let the container magic begin.

dockishell nvidia-smi

How to Use dockibook

Want to unleash the power of Jupyter Notebooks in a container? Say no more! Use dockibook and open the link in your browser, colab or visual studio code.

dockibook .

Don't want to use Docker but still would like to use the configuration? No problem! Use envipy and envibook to run your code and notebooks in a virtual environment.

Since Windows is such a messy work with rawdogging your environment is totally okay.

envipy my_script.py
envibook .

Configure environment

Tired of Docker feeling like a high-maintenance diva? Set up your environment like a pro with docki.yaml. No more Docker dramas, just smooth sailing.

docki --init

docki.yaml

This file is used to specify the base image, system dependencies, and python dependencies for the Docker container. If the file does not exist, a template will be created in the project root using docki --init.

base_image: The base image for the Docker container. You can find images on Docker Hub.

system_dep: A list of system dependencies to install in the Docker container. Install with apt-get.

python_dep: A list of python dependencies to install in the Docker container or a path to a requirements.txt file.

base_image: nvidia/cuda:11.8.0-devel-ubuntu22.04
shm_size: 16G # shared memory size
tag: docki_image
system_dep:
    - python3
    - python3-pip
    - python3-dev
    - python3-venv
python_dep:
    - jupyter
notebook_token: docki
notebook_password: docki

or

base_image: ubuntu:latest
shm_size: 16G # shared memory size
tag: docki_image
system_dep:
    - python3
    - python3-pip
    - python3-dev
    - python3-venv
python_dep:
    file: ./requirements.txt
notebook_token: docki
notebook_password: docki

Is something went wrong?

You can stop or kill the container with the following commands. It will use the tag from the docki.yaml file to stop or kill the container.

dockikill
dockistop

But this is not happening often, right? 🤞

TODO

  • Add support Windows Notebooks
  • Add support for Docker GPU driver installation on WLS2
  • Add support for Mac. I don't have a Mac! Pls send donations to my onlyfans so that i can afford one!

License

dockipy is like that cool friend who always lets you borrow their stuff without any fuss. It's distributed under the terms of the apache-2.0 license. So go ahead, have some fun with it! 🎉

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dockipy-0.0.22.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

dockipy-0.0.22-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file dockipy-0.0.22.tar.gz.

File metadata

  • Download URL: dockipy-0.0.22.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for dockipy-0.0.22.tar.gz
Algorithm Hash digest
SHA256 5786d41cf4e8c7db0b0372136716deb345d536188ac491ccdd5d67ff49e368b0
MD5 f95b6974e45b1f43a8323357d6b20ec1
BLAKE2b-256 0698a99ebb23aee73fb732023ba1d712bc49665457b1052c2530c0271f4f4cc8

See more details on using hashes here.

File details

Details for the file dockipy-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: dockipy-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for dockipy-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 05282e066bbf82176d49d80ce70b0b1830b1baae0de59c32482220b39adbf7d9
MD5 22b6f48bd699f98387ad7cd3e24104a1
BLAKE2b-256 9c02781723f605bfa220d5e280d919a4589f9ab996856ff565d7ac7f52b93b5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page