Create Python Dev Container
You are a DevOps expert setting up a Python development environment using Docker and VS Code Remote Containers.
این پرامپت چه کاری میکند؟
«Create Python Dev Container» یک پرامپت آماده در حوزهی پایتون و داده است که به هوش مصنوعی نقش یا وظیفهی مشخصی میدهد. متن را کپی کنید، متغیرهایش را پر کنید و در ChatGPT، Claude، Gemini بچسبانید.
متن کامل پرامپت
You are a DevOps expert setting up a Python development environment using Docker and VS Code Remote Containers.
Your task is to provide and run Docker commands for a lightweight Python development container based on the official python latest slim-bookworm image.
Key requirements:
- Use interactive mode with a bash shell that does not exit immediately.
- Override the default command to keep the container running indefinitely (use sleep infinity or similar) do not remove the container after running.
- Name it py-dev-container
- Mount the current working directory (.) as a volume to /workspace inside the container (read-write).
- Run the container as a non-root user named 'vscode' with UID 1000 for seamless compatibility with VS Code Remote - Containers extension.
- Install essential development tools inside the container if needed (git, curl, build-essential, etc.), but only via runtime commands if necessary.
- Do not create any files on the host or inside the container beyond what's required for running.
- Make the container suitable for attaching VS Code remotely (Remote - Containers: Attach to Running Container) to enable further Python development, debugging, and extension usage.
Provide:
1. The docker pull command (if needed).
2. The full docker run command with all flags.
3. Instructions on how to attach VS Code to this running container for development.
Assume the user is in the root folder of their Python project on the host.
ساخت نسخهی اختصاصی برای پروژهی شما
مشخصات پروژه را بنویسید؛ به انتهای پرامپت اضافه میشود و فایلی میگیرید که بدون توضیح اضافه به هوش مصنوعی داده میشود. همهچیز در مرورگر شما ساخته میشود و هیچ دادهای به سرور نمیرود.
پیشنمایش فایل نهایی
پرسشهای متداول
پرامپت «Create Python Dev Container» را چطور استفاده کنم؟
دکمهی کپی را بزنید، اگر متغیری دارد در بخش «پرکردن متغیرها» مقدارش را بنویسید و متن را در ChatGPT، Claude، Gemini، هر دستیار هوش مصنوعی بچسبانید. برای پاسخ فارسی در انتها اضافه کنید: «به فارسی پاسخ بده».
استفاده از این پرامپت رایگان است؟
بله. این پرامپت از مجموعهی prompts.chat (Awesome ChatGPT Prompts) با مجوز CC0-1.0 گردآوری شده و استفادهی شخصی و تجاری از آن آزاد است.
پرامپتها مرتبط در «پایتون و داده»
همهفهم traceback های طولانی پایتون و رسیدن سریع به خط مقصر.
کد پایتون کارا ولی ناشیانه را به کد تمیز و حرفهای تبدیل میکند.
ساخت گزارش هفتگی اکسل را با اسکریپت پایتون زمانبندیشده کاملاً خودکار میکند.
فرمول SUMIFS پویا برای جمع فروش با چند شرط همزمان مثل شهر، محصول و بازهی زمانی میسازد.
مشکل نمایش متن فارسی در نمودارهای پایتون را حل میکند و کد آمادهی خروجی تصویر میدهد.
کار تکراری روزانه در اکسل را به ماکروی VBA امن با پشتیبانگیری و مدیریت خطا تبدیل میکند.