File size: 1,425 Bytes
c14b430 6d63849 c14b430 6d63849 c14b430 eb7f180 c14b430 6d63849 c14b430 2dfde65 5bd4d08 f3e4c57 6d63849 f3e4c57 c14b430 11d67d0 c14b430 f3e4c57 c14b430 4b55779 f3e4c57 6d63849 4e73bee |
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 |
FROM continuumio/miniconda3
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
gnupg2 \
--no-install-recommends
# Add the unstable repository and its key
RUN echo "deb http://deb.debian.org/debian unstable main" > /etc/apt/sources.list.d/unstable.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
RUN apt-get install -y build-essential ffmpeg libsm6 libxext6
RUN apt-get update
RUN apt-get install -t unstable -y gdal-bin libgdal-dev
RUN apt-get install curl
RUN conda install -y python=3.10
RUN mkdir -p /data
RUN chmod 777 /data
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
RUN python -m pip install torchvision torch
RUN python -m pip install git+https://github.com/facebookresearch/detectron2.git
RUN python -m pip install torchvision torch rasterio
RUN python -m pip install git+https://github.com/PatBall1/detectree2.git
RUN python -m pip install opencv-python
RUN python -m pip install requests
RUN python -m pip install gradio
RUN python -m pip install plotly
COPY --chown=user . $HOME/app
RUN mkdir -m 700 -p $HOME/app/cache
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "localhost:7860" ]
CMD ["python", "-u", "main.py"]
|