mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-07-04 08:51:28 +02:00
Created Docker File (markdown)
+32
@@ -0,0 +1,32 @@
|
||||
```
|
||||
FROM ubuntu:latest
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get install -y wget git graphviz && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Miniconda
|
||||
ENV PATH="/opt/conda/bin:$PATH"
|
||||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /miniconda.sh && \
|
||||
bash /miniconda.sh -b -p /opt/conda && \
|
||||
rm /miniconda.sh
|
||||
|
||||
# Set work directory
|
||||
WORKDIR /app
|
||||
|
||||
# Clone the repository with submodules
|
||||
RUN git clone --recurse-submodules https://github.com/pablorevilla-meshtastic/meshview.git /app
|
||||
|
||||
# Create conda environment
|
||||
RUN conda create -n meshview python=3.11 -y
|
||||
|
||||
# Activate environment and install dependencies
|
||||
RUN /opt/conda/envs/meshview/bin/pip install -r /app/requirements.txt
|
||||
|
||||
# Expose the web server port
|
||||
EXPOSE 8081
|
||||
|
||||
# Start the application using the conda environment
|
||||
CMD ["/opt/conda/envs/meshview/bin/python", "/app/main.py"]
|
||||
```
|
||||
Reference in New Issue
Block a user