How to Create a Great Local Python Development Environment with Docker

  Рет қаралды 44,076

Docker

Docker

Жыл бұрын

Are you ready to take your Python development to the next level with Docker?
In this KZfaq 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/Instagram

Пікірлер: 53
@harkinrb
@harkinrb Жыл бұрын
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!
@aar021
@aar021 Жыл бұрын
This was awesome Patrick. Just what I needed.
@sabaokangan
@sabaokangan Жыл бұрын
Patrick Loeber is my hero!
@margramiof7926
@margramiof7926 Жыл бұрын
Hey Patrick, really nice tutorial. Thank you for sharing!
@nirmal_kumar
@nirmal_kumar Жыл бұрын
Thanks for the detailed explanation. I was wondering earlier how dockers really helps for development. This explains perfectly.
@jrrtolkin
@jrrtolkin 4 ай бұрын
Thank you for a great video. Well structured, detailed and informative. I will implement it for sure.
@user-qm7cs1bo8i
@user-qm7cs1bo8i 4 ай бұрын
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.
@teogf
@teogf Жыл бұрын
Best teacher over the world.
@user-cf7py3gn2y
@user-cf7py3gn2y 9 ай бұрын
Well-structured and pretty detailed video!!
@centameta8597
@centameta8597 11 ай бұрын
Best ever docker video!
@techatival
@techatival 4 ай бұрын
Thank you Patrick!
@samre3006
@samre3006 7 ай бұрын
Very useful. Thanks a lot for sharing this.
@OpenDeepLearning
@OpenDeepLearning 11 ай бұрын
I just love you! You helped me so much with this!
@Alexander-pk1tu
@Alexander-pk1tu Ай бұрын
This video rocks!! Very nicely said and organised
@zhenxuanjameszhang
@zhenxuanjameszhang 4 ай бұрын
I found this video useful. Thanks! I would suggest to add video chapter for easy navigation.
@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)
@andrewm4894
@andrewm4894 9 ай бұрын
Great tutorial.
@akshaydongare2136
@akshaydongare2136 2 ай бұрын
Amazing video!
@alejandrocarmonaligeon
@alejandrocarmonaligeon Жыл бұрын
Great video.
@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?
@schawanji
@schawanji 2 ай бұрын
Life saver!
@4AlexeyR
@4AlexeyR Ай бұрын
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?
@Gleissongtr
@Gleissongtr Жыл бұрын
Thank you so much!
@RomanGWatch
@RomanGWatch 7 ай бұрын
Best 🙇‍♂
@JJGhostHunters
@JJGhostHunters 7 ай бұрын
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 5 ай бұрын
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.
@dmytroparfeniuk2670
@dmytroparfeniuk2670 6 ай бұрын
Thanks for the video! So does it mean that each time you make the commit of that file you have to remove that line.
@dmytroparfeniuk2670
@dmytroparfeniuk2670 6 ай бұрын
I mean dubugging lines
@Dwdummies
@Dwdummies 5 ай бұрын
fastapi still not found in local even after attaching a running container
@_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 7 ай бұрын
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.
@user-cx6rg6mr7d
@user-cx6rg6mr7d Ай бұрын
I have a noob question, why we want to setup a dev environment in a docker?
@vijaipidinti8208
@vijaipidinti8208 6 ай бұрын
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 6 ай бұрын
You need to put the reference of the uvicorn in the requirements file as follows uvicorn[standard]. This will solve the problem!!
@Didanihaaaa
@Didanihaaaa 8 ай бұрын
great. show us using pycharm?
@tomhas4442
@tomhas4442 5 ай бұрын
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..
@soccernerd200
@soccernerd200 3 ай бұрын
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 2 ай бұрын
Same problem here!
@bikis8963
@bikis8963 Ай бұрын
Find and select /code folder
@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 7 ай бұрын
This is false. There are plenty of production apps out there written in Python.
@Chuukwudi
@Chuukwudi 16 күн бұрын
Did anyone make a note of all these things? Maybe a github repo md file or something ? Please, help!
@shk5253
@shk5253 Жыл бұрын
how about cuda?
@exmachina767
@exmachina767 7 ай бұрын
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.
@PedigreeGuitars
@PedigreeGuitars Жыл бұрын
Works only with zsh not with powershell. It fails with $(pwd), with powershell should be ${pwd}
@karlkemp5798
@karlkemp5798 10 ай бұрын
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 6 ай бұрын
Okay but surely you can use your experience as a developer to intuit what's going on
@bawitdaba1337
@bawitdaba1337 10 ай бұрын
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 7 ай бұрын
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 Жыл бұрын
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 Жыл бұрын
If you running from powershell shell use ${pwd} instead of $(pwd)
@hongkyulee9724
@hongkyulee9724 Жыл бұрын
Thank you for the good explanation
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 392 М.
Watermelon Cat?! 🙀 #cat #cute #kitten
00:56
Stocat
Рет қаралды 8 МЛН
Omega Boy Past 3 #funny #viral #comedy
00:22
CRAZY GREAPA
Рет қаралды 36 МЛН
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 102 МЛН
Python dataclasses will save you HOURS, also featuring attrs
8:50
How to create a great dev environment with Docker
29:55
Patrick Loeber
Рет қаралды 247 М.
Effective GPU Sharing Strategies in GKE
5:35
Container Bytes
Рет қаралды 142
Tutorial: Setup a Development Environment on Windows (Docker, WSL2, Ubuntu, Vscode)
15:30
KAUST Visualization Core Lab
Рет қаралды 35 М.
How To Use Docker To Make Local Development A Breeze
21:53
ArjanCodes
Рет қаралды 293 М.
How to Use FastAPI: A Detailed Python Tutorial
20:38
ArjanCodes
Рет қаралды 209 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН
15 Python Libraries You Should Know About
14:54
ArjanCodes
Рет қаралды 359 М.
How To Set Up Local DevOps Environment With Docker using Dev Containers
13:37
Очень странные дела PS 4 Pro
1:00
ТЕХНОБЛОГ ГУБАРЕВ СЕРГЕЙ
Рет қаралды 425 М.
i love you subscriber ♥️ #iphone #iphonefold #shortvideo
0:14
Где раздвижные смартфоны ?
0:49
Не шарю!
Рет қаралды 552 М.