File size: 1,633 Bytes
10e9dad
 
7c084e1
10e9dad
 
7c084e1
10e9dad
 
 
 
 
 
 
 
41c3aa2
 
 
 
e43b804
10e9dad
 
 
 
 
 
4d3c1bc
 
 
 
 
 
 
 
 
64d1aa9
 
 
 
 
 
4d3c1bc
10e9dad
d15fb1e
d838472
d15fb1e
d838472
e43b804
 
 
 
 
41c3aa2
10e9dad
7c084e1
 
41c3aa2
15529ce
41c3aa2
 
 
15529ce
 
 
 
41c3aa2
15529ce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Use the official Ubuntu base image
FROM ubuntu:20.04

# Set environment variables to non-interactive for apt
ENV DEBIAN_FRONTEND=noninteractive

# Install dependencies
RUN apt-get update && apt-get install -y \
    git \
    curl \
    sudo \
    wget \
    python3 \
    python3-pip \
    redis-server \
    postgresql \
    postgresql-contrib \
    libpq-dev \
    gdal-bin \
    && apt-get clean

# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - \
    && apt-get install -y nodejs

# Clone WebODM repository
RUN git clone https://github.com/OpenDroneMap/WebODM --depth 1 /webodm

# Set working directory
WORKDIR /webodm

# Fix permissions for the WebODM directory
RUN chmod -R 755 /webodm

# Ensure the user and group have the correct permissions
RUN groupadd webodmgroup
RUN useradd -m -g webodmgroup webodmuser
RUN chown -R webodmuser:webodmgroup /webodm

# Switch to the new user
USER webodmuser

# Modify requirements.txt to use compatible versions of numpy and scipy
RUN sed -i 's/numpy==1.26.2/numpy==1.24.4/' requirements.txt
RUN sed -i 's/scipy==1.11.3/scipy==1.10.1/' requirements.txt

# Install Python dependencies
RUN pip3 install -r requirements.txt

# Install WebODM dependencies without Docker
RUN ./webodm.sh install

# Expose the default WebODM port
EXPOSE 8000

# Create a start script to run necessary services and WebODM
RUN echo '#!/bin/bash\n\
sudo service redis-server start\n\
sudo service postgresql start\n\
./webodm.sh start --force-yes\n\
tail -f /dev/null' > /webodm/start.sh

RUN chmod +x /webodm/start.sh

# Start services and WebODM
CMD ["/webodm/start.sh"]