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
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ This project aims to provide a basic framework for understanding, training, and
13
13
- Save and load trained model weights.
14
14
- Utilize custom datasets by simply pointing to your directory.
15
15
- Test all available autoencoder architectures with a single command.
16
+
- Easily containerize and run using Docker.
16
17
17
18
## Getting Started
18
19
@@ -23,12 +24,32 @@ This project aims to provide a basic framework for understanding, training, and
23
24
- torchvision
24
25
- PIL
25
26
- matplotlib
27
+
- Docker (if you want to containerize the application)
26
28
27
29
### Installation
28
30
31
+
#### Traditional Setup:
32
+
29
33
1. Clone the repository.
30
34
2. Navigate to the project directory and install the required libraries.
31
35
36
+
#### Using Docker:
37
+
38
+
1. Clone the repository.
39
+
2. Navigate to the project directory.
40
+
3. Build the Docker image:
41
+
42
+
```bash
43
+
docker build -t autoencoder_research .
44
+
```
45
+
46
+
4. Run the container:
47
+
```bash
48
+
docker run -it --rm -v $(pwd):/app autoencoder_research bash
49
+
```
50
+
51
+
**Note:** If you're using the Docker method, you'll be inside the container's shell after running the above command. You can execute Python scripts or any other commands just like you would on your local machine.
52
+
32
53
## Usage
33
54
34
55
1. Modify the `settings/settings.py` file to point to your training and validation dataset.
@@ -51,3 +72,29 @@ python run.py --test
51
72
```
52
73
53
74
This will train each autoencoder for a few epochs and provide an overview of their performances.
75
+
76
+
## Common Issues and Solutions
77
+
78
+
### Issue: Docker Volume and Uppercase Paths on Windows
79
+
80
+
**Description:** On Windows, when trying to mount a local volume in Docker, an error might arise if the path contains uppercase letters. This is due to Docker expecting repository names (or paths) to be in lowercase.
81
+
82
+
**Solution:** Convert the current directory path to lowercase and replace backslashes with regular slashes. If you're using Git Bash or a similar terminal on Windows, follow the steps below:
83
+
84
+
1. Get the full path of the current directory in Windows format:
85
+
86
+
```bash
87
+
win_path=$(pwd -W)
88
+
```
89
+
90
+
2. Convert the path to lowercase and replace backslashes with regular slashes:
91
+
92
+
```bash
93
+
lowercase_path=$(echo $win_path| tr '[:upper:]''[:lower:]'| sed 's|\\|/|g')
94
+
```
95
+
96
+
3. Use this path in your Docker command:
97
+
98
+
```bash
99
+
docker run -it --rm -v "/$lowercase_path":/app autoencoder_research bash
0 commit comments