This repository contains a Docker-based development environment for Python projects. It provides a consistent and isolated environment for Python development, ensuring that all team members use the same dependencies and configurations.
- Docker: Install Docker
- In case of windows, please prepare docker environment in wsl2
- Visual Studio Code: Install VS Code
- docker for windows(mac): docker for windows
- Dev Containers
- Remote Development with Dev Containers included is also OK.
-
Clone this repository to your local machine:
git clone <this repository url>
-
Navigate to the project directory:
cd <project_directory>
-
Enter the required pip package in the
requirements.txt
file in the.devcontainer
folder example:numpy==1.26.0 pandas=>2.2.0
-
Press
ctrl + shift + p
to select>Dev Containers: rebuild and reopen in container
-
Wait a little....
-
Create a new repository on GitHub.
-
In your local environment, use the following command to check the information of the current remote repository:
git remote -v
-
Change the remote repository to the new GitHub repository. Use the following command to change the remote URL:
git remote set-url origin <your_new_github_repository>
-
Push the changes.
git push origin main
(Or use the branch name corresponding to the
main
branch) -
Refresh the repository page on GitHub to reflect the changes.
The directory structure of this project is as follows:
project_root/
│
├── .devcontainer/
│ ├── Dockerfile
│ ├── devcontainer.json
│ └── requirements.txt
│
│── .gitignore
│
│── LICENSE.txt
│── README.md
│
├── other_project_files...
-
.devcontainer/
: Contains Docker configuration files.Dockerfile
: Defines the Docker image for the development environment.devcontainer.json
: Configuration file for Visual Studio Code Remote Development.requirements.txt
: File containing Python dependencies for the project.
-
.gitignore
: This file allows you to specify files or directories to exclude from Git tracking.
If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.