File tree Expand file tree Collapse file tree 3 files changed +90
-0
lines changed Expand file tree Collapse file tree 3 files changed +90
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Use a base image with noVNC already set up
2
+ FROM linuxserver/webtop:ubuntu-xfce
3
+
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Install system dependencies
9
+ RUN apt-get update && apt-get install -y \
10
+ wget \
11
+ git \
12
+ build-essential \
13
+ cmake \
14
+ check \
15
+ libsubunit-dev \
16
+ pkg-config \
17
+ python3 \
18
+ python3-pip \
19
+ python3-setuptools \
20
+ python3-wheel \
21
+ libgl1-mesa-glx \
22
+ libglib2.0-0 \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ # Install Python dependencies
26
+ RUN pip3 install --no-cache-dir numpy matplotlib pytest tqdm cython pyyaml setuptools wheel
27
+
28
+ # Create work directory
29
+ WORKDIR /config/work
30
+
31
+ # Copy PyPTV source
32
+ COPY . /config/pyptv
33
+
34
+ # Install PyPTV
35
+ WORKDIR /config/pyptv
36
+ RUN pip3 install -e .
37
+
38
+ # Create startup script
39
+ RUN echo '#!/bin/bash\ncd /config/work\npython3 -m pyptv.pyptv_gui' > /config/start_pyptv.sh && \
40
+ chmod +x /config/start_pyptv.sh
41
+
42
+ # Create desktop shortcut
43
+ RUN mkdir -p /config/.config/autostart && \
44
+ echo "[Desktop Entry]\nVersion=1.0\nType=Application\nName=PyPTV\nComment=Particle Tracking Velocimetry\nExec=/config/start_pyptv.sh\nIcon=\nPath=/config/work\nTerminal=false\nStartupNotify=false" > /config/.config/autostart/pyptv.desktop
45
+
46
+ # Set working directory
47
+ WORKDIR /config/work
Original file line number Diff line number Diff line change
1
+ version : ' 3'
2
+
3
+ services :
4
+ pyptv :
5
+ build :
6
+ context : .
7
+ dockerfile : Dockerfile.minimal
8
+ ports :
9
+ - " 3000:3000" # noVNC web interface
10
+ volumes :
11
+ - ./data:/config/work # Mount local data directory
12
+ restart : unless-stopped
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Create data directory if it doesn't exist
4
+ mkdir -p data
5
+
6
+ # Build and start the container
7
+ docker-compose -f docker-compose.minimal.yml up -d
8
+
9
+ # Print instructions
10
+ echo "
11
+ PyPTV with noVNC is now running!
12
+
13
+ Access the PyPTV GUI by opening your web browser and navigating to:
14
+ http://localhost:3000
15
+
16
+ No password is required.
17
+
18
+ Your local 'data' directory is mounted to /config/work inside the container.
19
+ Any files you save there will be accessible on your host system.
20
+
21
+ To stop the container, run: docker-compose -f docker-compose.minimal.yml down
22
+ "
23
+
24
+ # Open browser (if available)
25
+ if command -v xdg-open & > /dev/null; then
26
+ xdg-open http://localhost:3000
27
+ elif command -v open & > /dev/null; then
28
+ open http://localhost:3000
29
+ elif command -v start & > /dev/null; then
30
+ start http://localhost:3000
31
+ fi
You can’t perform that action at this time.
0 commit comments