You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-6Lines changed: 22 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ You should now create a new environment with `conda`:
48
48
conda env create -f binder/environment.yml
49
49
```
50
50
51
-
> **Warning**
51
+
> [!WARNING]
52
52
>
53
53
> If you are on Windows and using Command Prompt or the PowerShell, please make sure to adjust the paths in the commands above accordingly.
54
54
@@ -74,7 +74,7 @@ jupyter lab
74
74
75
75
### 2. With Docker
76
76
77
-
> **Note**
77
+
> [!NOTE]
78
78
>
79
79
> The following instructions are for Windows. With minor changes, the steps work on macOS or Linux as well.
80
80
@@ -84,28 +84,44 @@ jupyter lab
84
84
85
85
3. Open PowerShell: Once Docker Desktop is installed, open PowerShell on your Windows machine. You can do this by pressing the "Windows" key and typing "PowerShell" in the search bar.
86
86
87
-
4. Pull the Docker image: In PowerShell, run the following command to pull the "empascientificit/python-tutorial" Docker image:
87
+
4. Pull the Docker image: In PowerShell, run the following command to pull the Docker im
F438
age:
> The `latest` tag points to the CPU-only variant of the image, which is optimized for size and compatibility. If you have a CUDA-compatible GPU and want to use GPU acceleration for PyTorch operations, you can use the CUDA-enabled variant by replacing `latest` with `cuda`:
> Using the CUDA variant requires a NVIDIA GPU with compatible drivers properly installed and configured for Docker. See [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) for setup instructions.
104
+
93
105
5. Run the Docker container: Once the image is downloaded, run the following command to start a Docker container from the image:
> If you pulled the CUDA variant, replace `:latest` with `:cuda` in the command above.
114
+
99
115
Replace `/path/to/python-tutorial` with the path to the folder you created in step 2, for example `C:/Users/yourusername/Desktop/python-tutorial`.
100
116
101
-
> **Note**
117
+
> [!NOTE]
102
118
>
103
-
> The above command will **mirror** the content of your local folder (e.g., `C:/Users/yourusername/Desktop/python-tutorial`) to the `work/` folder **inside the container**. In this way, every file or folder you copy or create into `work/` will be saved on your machine, and will remain there **even if you stop Docker**.
119
+
> The above command will **mirror** the content of your local folder (e.g., `C:/Users/yourusername/Desktop/python-tutorial`) to the `~/python-tutorial` folder **inside the container**. In this way, every file or folder you copy or create into `~/python-tutorial` will be saved on your machine, and will remain there **even if you stop Docker**.
104
120
105
121
6. Access the Jupyter Notebook: Open a web browser and navigate to `http://localhost:8888/lab`. You should see the Jupyter Notebook interface. Enter the token provided in the PowerShell console to access the notebook. Alternatively, you can directly click on the link that appears in the PowerShell after the container has started.
106
122
107
123
You can now use the Jupyter in the Docker container to run the python-tutorial. When you're done, you can stop the container by pressing `Ctrl+C` in the PowerShell console.
108
124
109
-
> **Note**
125
+
> [!NOTE]
110
126
>
111
127
> If you want to restart the container, you can simply run the command `docker container start python_tutorial`.
0 commit comments