Skip to content

Commit b06d340

Browse files
lsteinLincoln Stein
andauthored
[Docs] Installation updates (#86)
* add in-terminal launch script for linux pyinstaller * launch linux pyinstaller in window --------- Co-authored-by: Lincoln Stein <[email protected]>
1 parent cdf5bd1 commit b06d340

File tree

4 files changed

+116
-1
lines changed

4 files changed

+116
-1
lines changed

INSTALL/pyinstaller/make_pyinstaller_image.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,26 @@ df -h
131131
# After PyInstaller
132132
rm -rf build/ # Remove PyInstaller temp files
133133

134+
# Add a Linux launcher script to run in terminal
135+
if [[ "$(uname)" == "Linux" && "$MACOS_APP" == false ]]; then
136+
LAUNCHER="dist/run_photomap"
137+
cat > "$LAUNCHER" <<EOF
138+
#!/bin/bash
139+
# Launcher script to run PhotoMap in a new terminal window
140+
TERMINAL_CMD="x-terminal-emulator -e"
141+
if command -v gnome-terminal &> /dev/null; then
142+
TERMINAL_CMD="gnome-terminal --"
143+
elif command -v konsole &> /dev/null; then
144+
TERMINAL_CMD="konsole -e"
145+
elif command -v xterm &> /dev/null; then
146+
TERMINAL_CMD="xterm -e"
147+
fi
148+
exec $TERMINAL_CMD \$(dirname "\$0")/photomap/photomap
149+
EOF
150+
chmod +x "$LAUNCHER"
151+
echo "✅ Linux launcher script created: dist/photomap"
152+
fi
153+
134154
# Post-process macOS .app bundle to launch in Terminal
135155
if [[ "$MACOS_APP" == true ]]; then
136156
APP_BUNDLE="dist/photomap.app"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ start_photomap
140140

141141
Then open your web browser and point it to [http://127.0.0.1:8050](http://128.0.0.1:8050). Follow the prompts to create your first album.
142142

143+
## Other Installation Methods
144+
145+
In addition to the above, PhotoMapAI can be installed via [Docker](https://lstein.github.io/PhotoMapAI/installation/#docker-install), [PyPi](https://lstein.github.io/PhotoMapAI/installation/#pypi-installation), or a [double-click desktop executable](https://lstein.github.io/PhotoMapAI/installation/#executable-install).
146+
143147
## Detailed Guides
144148

145149
- [Installation](https://lstein.github.io/PhotoMapAI/installation/)

docs/index.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,45 @@ Change `/path/to/a/picture_folder` to a path on your desktop that contains the i
137137

138138
---
139139

140+
### Executable Install
141+
142+
As of version 0.9.4, there is also an option to install a prebuilt executable package. This package does not require you to install Python, CUDA, or any other PhotoMapAI dependencies. However, the executable is not yet code-signed, meaning that Windows and Mac users will have to bypass code safety checks.
143+
144+
Go to the latest [release page](https://github.com/lstein/PhotoMapAI/releases) and look under **assets**. There you will find the following files, where X.X.X is replaced by the current released version number:
145+
146+
| Name | Platform | GPU Acceleration |
147+
|-----------------------------------|---------------------|--------------|
148+
| photomap-linux-x64-cpu-vX.X.X.zip | Linux | none |
149+
| photomap-linux-x64-cu129-vX.X.X.zip | Linux | CUDA 12.9 |
150+
| photomap-macos-x64-cpu-vX.X.X.zip | Macintosh | built-in acceleration|
151+
| photomap-windows-x64-cpu-vX.X.X.zip | Windows | none|
152+
| photomap-windows-x64-cu129-vX.X.X.zip | Windows | CUDA 12.9|
153+
154+
If you have an Nvidia card and any of the CUDA 12.X libraries installed, you can take advantage of accelerated image indexing by choosing one of the `cu129` packages. Download the zip file for your platform and unpack it. Then follow these instructions to bypass the operating system's code-checking:
155+
156+
#### Mac
157+
158+
Using the command-line terminal, navigate to the unpacked folder `photomap-macos-x64-cpu-vX.X.X` and run this command:
159+
160+
```bash
161+
xattr -d com.apple.quarantine ./photomap-macos-x64-cpu-vX.X.X`
162+
```
163+
(Use the actual version number, not X.X.X). This step only has to be done once.
164+
165+
Now you can double-click on the package and the PhotoMapAI server will launch in a terminal window after a brief delay.
166+
167+
#### Windows
168+
169+
After unpacking, navigate into the folder and double-click on `photomap.exe`. You will be warned that you are trying to run untrusted code. Click on the `More info` link, and choose `Run anyway`. After a short delay, a new terminal window will open up with the output from the PhotoMapAI server.
170+
171+
You'll need to override the untrusted code check each time you launch PhotoMapAI.
172+
173+
#### Linux
174+
175+
Using the terminal/command-line shell, navigate to the unpacked folder and run `./photomap`. No trusted code workarounds are needed. If you prefer to double-click an icon, there is a `run_photomap.sh` script in the folder that will launch a terminal for you and run PhotoMapAI inside it.
176+
177+
---
178+
140179
## Detailed Guides
141180
142181
- [Installation](installation.md)

docs/installation.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ Before installing PhotoMapAI, you'll need to install Python and optionally CUDA.
2121
- [Python](installation/python.md)
2222
- [CUDA](installation/cuda.md) (*Only if you need NVidia GPU card support*)
2323

24-
After the preqrequisites are installed, follow the installation directions for [Linux & MacOS](#linux-macos) or [Windows](#windows). For those who are comfortable with the command shell, there are also instructions for [Manual Installs](#manual-installation)
24+
After the preqrequisites are installed, follow the installation directions for [Linux & MacOS](#linux-macos) or [Windows](#windows). For those who are comfortable with the command shell, there are also instructions for [Manual Install](#manual-installation) and [Docker Install](#docker-install).
25+
26+
Finally, there are a series of experimental double-click executables for all three platforms. See [Executable Install](#executable-install) for details.
2527

2628
---
2729

@@ -172,3 +174,53 @@ bash
172174
```
173175

174176
You can also just use the file browser to navigate to the `start_photomap` executable and double-click it.
177+
178+
---
179+
180+
### Docker Install
181+
182+
If you have Docker installed on your system, here is a one-liner to get PhotoMapAI up and running:
183+
184+
```bash
185+
docker -p 8050:8050 -v /path/to/a/picture_folder:/Pictures lstein/photomapai:latest
186+
```
187+
Change `/path/to/a/picture_folder` to a path on your desktop that contains the images/photos you wish to add to an album. After the startup messages, point your browser to http://localhost:8050 and follow the prompts. Your images will be found in the container directory `/Pictures`.
188+
189+
---
190+
191+
## Executable Install
192+
193+
As of version 0.9.4, there is also an option to install a prebuilt executable package. This package does not require you to install Python, CUDA, or any other PhotoMapAI dependencies. However, the executable is not yet code-signed, meaning that Windows and Mac users will have to bypass code safety checks.
194+
195+
Go to the latest [release page](https://github.com/lstein/PhotoMapAI/releases) and look under **assets**. There you will find the following files, where X.X.X is replaced by the current released version number:
196+
197+
| Name | Platform | GPU Acceleration |
198+
|-----------------------------------|---------------------|--------------|
199+
| photomap-linux-x64-cpu-vX.X.X.zip | Linux | none |
200+
| photomap-linux-x64-cu129-vX.X.X.zip | Linux | CUDA 12.9 |
201+
| photomap-macos-x64-cpu-vX.X.X.zip | Macintosh | built-in acceleration|
202+
| photomap-windows-x64-cpu-vX.X.X.zip | Windows | none|
203+
| photomap-windows-x64-cu129-vX.X.X.zip | Windows | CUDA 12.9|
204+
205+
If you have an Nvidia card and any of the CUDA 12.X libraries installed, you can take advantage of accelerated image indexing by choosing one of the `cu129` packages. Download the zip file for your platform and unpack it. Then follow these instructions to bypass the operating system's code-checking:
206+
207+
#### Mac
208+
209+
Using the command-line terminal, navigate to the unpacked folder `photomap-macos-x64-cpu-vX.X.X` and run this command:
210+
211+
```bash
212+
xattr -d com.apple.quarantine ./photomap-macos-x64-cpu-vX.X.X`
213+
```
214+
(Use the actual version number, not X.X.X). This step only has to be done once.
215+
216+
Now you can double-click on the package and the PhotoMapAI server will launch in a terminal window after a brief delay.
217+
218+
#### Windows
219+
220+
After unpacking, navigate into the folder and double-click on `photomap.exe`. You will be warned that you are trying to run untrusted code. Click on the `More info` link, and choose `Run anyway`. After a short delay, a new terminal window will open up with the output from the PhotoMapAI server.
221+
222+
You'll need to override the untrusted code check each time you launch PhotoMapAI.
223+
224+
#### Linux
225+
226+
Using the terminal/command-line shell, navigate to the unpacked folder and run `./photomap`. No trusted code workarounds are needed. If you prefer to double-click an icon, there is a `run_photomap.sh` script in the folder that will launch a terminal for you and run PhotoMapAI inside it.

0 commit comments

Comments
 (0)