ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

How to Create a Great Local Python Development Environment with Docker

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2023
  • Are you ready to take your Python development to the next level with Docker?
    In this TH-cam video, Patrick Loeber shows you how to create an amazing local Python development environment using Docker. He starts by introducing the many benefits of using Docker, including its ability to isolate environments, add multiple services, deploy to the cloud, and test out different Python versions. Then, Patrick takes you on a step-by-step journey through the process of setting up a Docker environment. You'll learn how to write an app, use volumes to transfer files between the container and the system, set up an IDE inside the container, and use Docker compose to simplify the process.
    Plus, Patrick shows you how to add more services and debug Python code inside a container.
    --
    Join the conversation!
    • LinkedIn → dockr.ly/LinkedIn
    • Twitter → dockr.ly/Twitter
    • Facebook → dockr.ly/Facebook
    • Instagram → dockr.ly/Insta...

ความคิดเห็น • 56

  • @harkinrb
    @harkinrb ปีที่แล้ว +13

    Brilliant video. Very well structured and presented. Solves pretty much all the complaints I had with my existing setup. Thanks and keep up the good work!

  • @user-qm7cs1bo8i
    @user-qm7cs1bo8i 7 หลายเดือนก่อน +1

    Really awesome explanation . Most of the docker videos I watched where geared towards node , react and other web dev frameworks. I am mostly working with python so this was a great watch and informational.

  • @zhenxuanjameszhang
    @zhenxuanjameszhang 6 หลายเดือนก่อน +1

    I found this video useful. Thanks! I would suggest to add video chapter for easy navigation.

  • @tomhas4442
    @tomhas4442 7 หลายเดือนก่อน

    excellent tutorial, many thanks!
    tip: if you run into issue that the service is not available (localhost:80) the port might be used by another application. Simply change '-80:80' to '-8000:80' in docker-compose.yaml to use port 8000..

  • @aristotelesfernando
    @aristotelesfernando 9 วันที่ผ่านมา

    Awesome video!

  • @jrrtolkin
    @jrrtolkin 7 หลายเดือนก่อน +1

    Thank you for a great video. Well structured, detailed and informative.
    I will implement it for sure.

  • @nirmal_kumar
    @nirmal_kumar ปีที่แล้ว +3

    Thanks for the detailed explanation. I was wondering earlier how dockers really helps for development. This explains perfectly.

  • @gilsonjunior_narrador
    @gilsonjunior_narrador 20 ชั่วโมงที่ผ่านมา

    Thank you for sharing ! My output is only in terminal screen, I am not able to send to browser. Do you have some tips ?

  • @teogf
    @teogf ปีที่แล้ว

    Best teacher over the world.

  • @techatival
    @techatival 6 หลายเดือนก่อน +1

    Thank you Patrick!

  • @sabaokangan
    @sabaokangan ปีที่แล้ว

    Patrick Loeber is my hero!

  • @margramiof7926
    @margramiof7926 ปีที่แล้ว +2

    Hey Patrick, really nice tutorial. Thank you for sharing!

  • @Alexander-pk1tu
    @Alexander-pk1tu 3 หลายเดือนก่อน

    This video rocks!! Very nicely said and organised

  • @aar021
    @aar021 ปีที่แล้ว +2

    This was awesome Patrick. Just what I needed.

  • @4AlexeyR
    @4AlexeyR 3 หลายเดือนก่อน

    Thanks for interesting approach using IDE inside a container. Could you explain why you do not use --watch to volume to update code immediately after change on host's mapped volume? What benefits to edit with VSCode in the container instead of the local host filesystem?

  • @schawanji
    @schawanji 4 หลายเดือนก่อน +1

    Life saver!

  • @JJGhostHunters
    @JJGhostHunters 9 หลายเดือนก่อน +1

    Is it possible to run Spyder IDE within Docker in Ubuntu and access GPUs? I have not seen resources that explain how to enable this.

  • @FrocketGaming
    @FrocketGaming 7 หลายเดือนก่อน

    This was helpful but I tried to create a more generic data science image but just could not get it to work as not container was ever running for me to attach to.

  • @samre3006
    @samre3006 9 หลายเดือนก่อน

    Very useful. Thanks a lot for sharing this.

  • @centameta8597
    @centameta8597 ปีที่แล้ว

    Best ever docker video!

  • @akshaydongare2136
    @akshaydongare2136 5 หลายเดือนก่อน

    Amazing video!

  • @OpenDeepLearning
    @OpenDeepLearning ปีที่แล้ว

    I just love you! You helped me so much with this!

  • @user-cf7py3gn2y
    @user-cf7py3gn2y 11 หลายเดือนก่อน

    Well-structured and pretty detailed video!!

  • @igorlikholat5606
    @igorlikholat5606 ปีที่แล้ว

    brilliant tutorial! thank you
    I have a question.. I’m confused with how to debug worker command inside docer container, when it possible to run in bash console only?
    I’m going to be glad hearing your answer)

  • @MounkailaGarba-kl6rq
    @MounkailaGarba-kl6rq หลายเดือนก่อน

    merci

  • @user-cx6rg6mr7d
    @user-cx6rg6mr7d 4 หลายเดือนก่อน

    I have a noob question, why we want to setup a dev environment in a docker?

  • @andrewm4894
    @andrewm4894 11 หลายเดือนก่อน

    Great tutorial.

  • @alqods80
    @alqods80 ปีที่แล้ว

    I used to use the xdebug extension in vscode ide for php, did you used the same does debugpy need it own extension?

  • @alejandrocarmonaligeon
    @alejandrocarmonaligeon ปีที่แล้ว

    Great video.

  • @RomanGWatch
    @RomanGWatch 10 หลายเดือนก่อน

    Best 🙇‍♂

  • @Dwdummies
    @Dwdummies 7 หลายเดือนก่อน

    fastapi still not found in local even after attaching a running container

  • @dmytroparfeniuk2670
    @dmytroparfeniuk2670 8 หลายเดือนก่อน

    Thanks for the video!
    So does it mean that each time you make the commit of that file you have to remove that line.

  • @Chuukwudi
    @Chuukwudi 2 หลายเดือนก่อน

    Did anyone make a note of all these things? Maybe a github repo md file or something ? Please, help!

  • @Parallellook
    @Parallellook ปีที่แล้ว

    i used python 1 year and it was fun. bat i didnt know it is imposible ti have more then one project per pc. and eaven if have only one project on your pc you can't finish it. it have tiùo stay at a prototip stage forever. now i have to switch to somting else

    • @exmachina767
      @exmachina767 9 หลายเดือนก่อน

      This is false. There are plenty of production apps out there written in Python.

  • @vijaipidinti8208
    @vijaipidinti8208 8 หลายเดือนก่อน

    Hello, I did exactly the same as per your tutorial, I am using the docker desktop in windows 10, I am able to create the image , however the container wound not start and gives the following error "Error: (HTTP code 400) unexpected - failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "uvicorn": executable file not found in $PATH: unknown". Could you please help on this?

    • @johndsa552
      @johndsa552 8 หลายเดือนก่อน

      You need to put the reference of the uvicorn in the requirements file as follows uvicorn[standard]. This will solve the problem!!

  • @Didanihaaaa
    @Didanihaaaa 10 หลายเดือนก่อน

    great. show us using pycharm?

  • @soccernerd200
    @soccernerd200 5 หลายเดือนก่อน

    I'm stuck at 14:36. I have followed all steps, but when I choose attach to a running container, and select my container, no code pulls through to the new instance. Any ideas? Do I need to do this step?

    • @janlodewijk1985
      @janlodewijk1985 4 หลายเดือนก่อน

      Same problem here!

    • @test-d7y
      @test-d7y 4 หลายเดือนก่อน

      Find and select /code folder

  • @Gleissongtr
    @Gleissongtr ปีที่แล้ว

    Thank you so much!

  • @_promptcoder
    @_promptcoder ปีที่แล้ว

    I required gcc-4.7 as a dependency to install some of python package. How can we add gcc-4.7

    • @exmachina767
      @exmachina767 9 หลายเดือนก่อน

      You can use the RUN command to run commands during image construction, e.g., “apt-get install build-essential” or any other command you’d normally run in your terminal.

  • @PedigreeGuitars
    @PedigreeGuitars ปีที่แล้ว

    Works only with zsh not with powershell. It fails with $(pwd), with powershell should be ${pwd}

  • @karlkemp5798
    @karlkemp5798 ปีที่แล้ว

    Patrick, I'm a beginner and want to learn docker. You didn't start from the beginning. 1) What do you need to install on your OS, for example Docker Desktop, VS Code , Git etc. 2) What recommended OS a beginner should use - OSX, Windows, Linux/Ubuntu etc. You just jumped into coding an ap etc.

    • @boxboxerson991
      @boxboxerson991 8 หลายเดือนก่อน

      Okay but surely you can use your experience as a developer to intuit what's going on

  • @shk5253
    @shk5253 ปีที่แล้ว

    how about cuda?

    • @exmachina767
      @exmachina767 9 หลายเดือนก่อน

      Yes, you can also build containers with CUDA libraries inside. Or you can reuse public pre-built containers with CUDA and any machine learning libraries you need.

  • @bawitdaba1337
    @bawitdaba1337 ปีที่แล้ว

    couldn't be anymore confusing, you have to manually edit and manage dockerfiles in a text editor and not in docker desktop? seems easier just to use a vm

    • @exmachina767
      @exmachina767 9 หลายเดือนก่อน

      Docker wasn’t initially created for development but as a packaging solution for deployment. As a result, its tools are not designed to make it trivial for beginners. That said, using VMs is an option but it’s much heavier and slower compared to containers. Once you know the basics, getting a container up and running is a breeze compared to running a VM.

  • @paradoxOP1002
    @paradoxOP1002 ปีที่แล้ว +1

    hey, i have an issue creating the volume : docker run -d --name fastapi-container -p 80:80 -v $(pwd):/code fastapi-image
    this is giving me error : docker: invalid reference format.
    See 'docker run --help'.
    plz help :)

    • @petervinter1413
      @petervinter1413 ปีที่แล้ว +3

      If you running from powershell shell use ${pwd} instead of $(pwd)

  • @hongkyulee9724
    @hongkyulee9724 ปีที่แล้ว

    Thank you for the good explanation