From 2897e3fab520ec1d75d3560a5338a29856c72294 Mon Sep 17 00:00:00 2001 From: Pablo Revilla Date: Fri, 30 May 2025 17:19:01 -0700 Subject: [PATCH] Created Docker file (markdown) --- Docker-file.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Docker-file.md diff --git a/Docker-file.md b/Docker-file.md new file mode 100644 index 0000000..bda7bc7 --- /dev/null +++ b/Docker-file.md @@ -0,0 +1,30 @@ +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"] \ No newline at end of file