Containerize Python Applications with Docker

Sdílet
Vložit
  • čas přidán 18. 12. 2022
  • In this video, we learn how to containerize Python applications using Docker. This is a key skill in the industry.
    Docker Installation: docs.docker.com/get-docker/
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
  • Věda a technologie

Komentáře • 67

  • @amatera2
    @amatera2 Před rokem +78

    For the second Dockerfile you showed in this video (18:25) I just wanted to mention that in general it's better practice to have RUN pip install directly after COPY requirements.txt and before COPY ./src
    This is because of the way docker caches build layers. As soon as any change happens, all subsequent commands will also need to be rerun. The way you had it, if you changed any files in the ./src directory, then when you build the pip install command would also be run again. However by changing it how I mentioned, the pip install will be cached and only get rerun if you change the requirements.txt
    In this example it wasn't a big deal, but if your project has a huge number of dependencies then this can save a lot of time during the build process.

    • @xMSaccountx
      @xMSaccountx Před rokem +3

      oh wow thanks for that mate ,going to definitely take a close look to my files as well ,efficency is key

    • @keflerbrownb.6450
      @keflerbrownb.6450 Před rokem +1

      Can we containerize PyQt5 app ?

    • @abdelrhmansayed5436
      @abdelrhmansayed5436 Před 8 měsíci +1

      you are 100% right 👌

  • @HitAndMissLab
    @HitAndMissLab Před rokem +2

    Wow, this was a great intro video!
    I heard about the Docker x100 times, but never knew what was its purpose. Now I understand the whole concept.
    Thanks!

  • @johnraz99
    @johnraz99 Před 2 měsíci

    Thanks! Was learning Python and now a bonus with Docker!

  • @HersonMelo
    @HersonMelo Před rokem +7

    Amazing!!! Thanks for always sharing your knowledge!

  • @hyakushiki23
    @hyakushiki23 Před 3 měsíci

    Super helpful! First time using Dockers and thank you so much for your amazing videos and they are great tutorials

  • @yahnnoshyunggo4673
    @yahnnoshyunggo4673 Před 8 měsíci

    Thank you! You explained it simple and clearly

  • @Akonitx
    @Akonitx Před rokem +1

    so simple... I had thought that to put your web app to docker is much harde. Thanks for your explanation

  • @ParanoidNotAndroid
    @ParanoidNotAndroid Před 7 měsíci

    Really good presentation straight to the point and presenting something really usefull in an easy way!
    Thanks

  • @djeros666
    @djeros666 Před 9 měsíci

    thank you. defo easy to follow and understand, finally..

  • @cesarp6761
    @cesarp6761 Před rokem

    would be great to know what to do next in case you want to run the docker in a raspeberry, or aws or another remote place.. how do you get it from your machine.. options? : upload/download from the docker hub, move manually, etc..

  • @michaelmebratu2921
    @michaelmebratu2921 Před rokem +13

    You are the GOAT 🐐 of the best python tutorial!!

  • @mohammedal-mudhafar4602
    @mohammedal-mudhafar4602 Před měsícem

    Great content, Thanks a lot !

  • @rmatveev
    @rmatveev Před 8 měsíci

    Why are you using square brackets in your CMD docker file command and not for RUN command?

  • @juanete69
    @juanete69 Před 3 měsíci

    Do you need to client.close() inside the while loop or outside? Why?
    If we want it to work on both Linux and Windows, do we need to write
    instead of just
    ?

  • @mduoonus656
    @mduoonus656 Před 6 měsíci

    very good guide line tks

  • @ramya1139
    @ramya1139 Před rokem

    10:01 -- the cmd prompt is hanging after the docker build command, any possible reasons???

  • @GrigoriKog
    @GrigoriKog Před rokem

    can i docker a python project with yolov8 ? Also how can i return the frame
    that shows car video detection and counter cap=cv2.VideoCapture('park.mp4')

  • @awuyadaniel8982
    @awuyadaniel8982 Před 4 měsíci

    Beautiful
    Thanks man

  • @cezarycodes2192
    @cezarycodes2192 Před rokem +2

    Nice video! Pls make video about kubernetes :)

  • @quidelicia1
    @quidelicia1 Před rokem

    Nice. Thanks for sharing the knowledge!!!

    • @keflerbrownb.6450
      @keflerbrownb.6450 Před rokem

      Can we containerize PyQt5 app ?

    • @quidelicia1
      @quidelicia1 Před rokem

      @@keflerbrownb.6450 I'm pretty sure you can containerize almost anything on your SO, but I'm not the best person to tell you how.

    • @keflerbrownb.6450
      @keflerbrownb.6450 Před rokem

      @@quidelicia1 i'm have been trying Docker on a basic pyqt5 frame app, it's doesn't run

    • @atlantic_love
      @atlantic_love Před rokem

      @@keflerbrownb.6450 Stop spamming. Obviously no one has an aswer for you.

  • @maloukemallouke9735
    @maloukemallouke9735 Před 9 měsíci

    how do you doing when you need application with muliprcessing in python?

  • @PatrickSVM
    @PatrickSVM Před rokem

    Thanks for the explanation!

  • @TeamHLUPa
    @TeamHLUPa Před 4 měsíci

    Thanks!

  • @gabrielmartins7642
    @gabrielmartins7642 Před 11 měsíci

    Sadly I have a very cheep acer laptop that in all circumstances would be able to suport virtualization except if acer wasn't garbage and blocked jt from the bios with no option to ever activate it... Acer aspire E15... sometimes I get really angry when I see a new skill that I could be learning but am stuck by my hardware

  • @comon928
    @comon928 Před rokem +1

    Hi, following the video ("publish your own python package"), I published a python package ( textbin==0.0.1) based on your other video "convert text to binary", but when I import it in a script, I get this error. (" AttributeError: module 'textbin' has no attribute 'to_binary'") .how can I solve this??

  • @ongphamong906
    @ongphamong906 Před rokem

    How to install tensorflow gpu on wsl2?

  • @lurby89
    @lurby89 Před 28 dny

    Great!!

  • @user-nw4nu8mf1b
    @user-nw4nu8mf1b Před rokem +1

    Why are EXPOSE statements not being used?

  • @omudugavu
    @omudugavu Před rokem

    hi my customtkinter wont run in my visual studio, cant tell why, an error comes saying( File "c:\Users\CABIN STORE\Desktop\build\hhhh.py", line 3, in
    import customtkinter ) what would be the problem, tho it runs in my pycharm , but i want it in visualstudio

    • @vymvn6
      @vymvn6 Před rokem

      Check which python interpreter is being used

  • @ricardocantu
    @ricardocantu Před rokem +1

    I understood that the container will include any packages that are not installed on the system, but what about python itself? Is that also included, or does the system running docker need to have had python installed before?

    • @emrahe468
      @emrahe468 Před rokem +2

      "When you create a Docker image, you can specify the base image, which provides the runtime environment for your application. For example, you might use a base image that includes Python, such as the python:3.9 image. This base image includes the Python runtime environment, which means that you don't need to have Python installed on the system running Docker.
      So to answer the question, yes, the Python runtime environment is included in the Docker image, as long as you specify a base image that includes Python. You don't need to have Python installed on the system running Docker.
      It's worth noting that when you create a Docker image, you're creating an isolated environment that is separate from the host system. This means that any changes made within the container, such as installing additional Python packages, will not affect the host system. This can be a powerful tool for ensuring that your application runs consistently and reliably across different systems, without having to worry about conflicts with other applications or dependencies."

  • @Daystarjn
    @Daystarjn Před rokem

    Bro can you please make a tut on how to make our own port forwarder server

  • @laodefefliyarlin939
    @laodefefliyarlin939 Před rokem

    HOW TO CREATE A SPEECH RECOGNITION USING MFCC AND HMM

  • @wasgeht2409
    @wasgeht2409 Před rokem

    Thanks

  • @user-wl3lk4hy9h
    @user-wl3lk4hy9h Před 11 měsíci

    What about odoo

  • @Hamid-wr7pe
    @Hamid-wr7pe Před měsícem

    👏🏻

  • @serychristianrenaud
    @serychristianrenaud Před rokem

    THANK

  • @keflerbrownb.6450
    @keflerbrownb.6450 Před rokem +1

    Can we containerize PyQt5 app ?

  • @johnwu5908
    @johnwu5908 Před rokem

    GOAT

  • @Maric18
    @Maric18 Před rokem

    intro over at 7:50

  • @SenselessTalk
    @SenselessTalk Před rokem

    Flori, you should make a tutorial how to deploy dockerized environments to other PC/Server.
    This is pointless, why would I deploy my python app on my PC using docker.

    • @AstroStrongBox
      @AstroStrongBox Před 11 měsíci

      Agreed deploying to casaOS to run Python application on a home server using the ZimaBoard would be a great use case.

    • @SuyashSonawane
      @SuyashSonawane Před 8 měsíci

      The point is that you then also get to test your code with upcoming versions of python. Future projects of yours could run on different python versions as well. Managing multiple python versions system-wide or even with virtual-envs gets tiring after a while.

  • @willbrodmutesi4989
    @willbrodmutesi4989 Před rokem

    Containerise flask app

  • @jotsingh9319
    @jotsingh9319 Před rokem +1

    Hey man can you make a video on python Instagram bot ?

  • @fofokharrat7219
    @fofokharrat7219 Před rokem +3

    I'm first 🥇

  • @chriskeo392
    @chriskeo392 Před rokem

    Video starts @ 7:30
    Anything before is out of scope

  • @arthurmann1624
    @arthurmann1624 Před rokem +1

    What is the chance you'll make a tutorial of an example of microservices with docker and whatever framework in Python? Plssss
    Like this comment to make him see it 😘👍

  • @danielniels22
    @danielniels22 Před 13 dny

    thank you. i just finished a 5 hours docker course that covers A to Z of docker features but didn't even give a case study like this 🥲

  • @DavidSucker69
    @DavidSucker69 Před měsícem

    Martin Garrix--Programmer Edition😍