umgefahren
commited on
Commit
·
6d63849
1
Parent(s):
bc19b2d
Add heath check
Browse files- Dockerfile +10 -7
- main.py +0 -1
Dockerfile
CHANGED
@@ -1,19 +1,20 @@
|
|
1 |
FROM continuumio/miniconda3
|
2 |
|
3 |
RUN apt-get update && apt-get install -y \
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
|
9 |
# Add the unstable repository and its key
|
10 |
RUN echo "deb http://deb.debian.org/debian unstable main" > /etc/apt/sources.list.d/unstable.list && \
|
11 |
-
|
12 |
-
|
13 |
|
14 |
RUN apt-get install -y build-essential ffmpeg libsm6 libxext6
|
15 |
RUN apt-get update
|
16 |
RUN apt-get install -t unstable -y gdal-bin libgdal-dev
|
|
|
17 |
|
18 |
RUN conda install -y python=3.10
|
19 |
|
@@ -26,7 +27,7 @@ RUN useradd -m -u 1000 user
|
|
26 |
USER user
|
27 |
|
28 |
ENV HOME=/home/user \
|
29 |
-
|
30 |
|
31 |
WORKDIR $HOME/app
|
32 |
|
@@ -46,4 +47,6 @@ RUN mkdir -m 700 -p $HOME/app/cache
|
|
46 |
|
47 |
EXPOSE 7860
|
48 |
|
|
|
|
|
49 |
CMD ["python", "main.py"]
|
|
|
1 |
FROM continuumio/miniconda3
|
2 |
|
3 |
RUN apt-get update && apt-get install -y \
|
4 |
+
apt-transport-https \
|
5 |
+
ca-certificates \
|
6 |
+
gnupg2 \
|
7 |
+
--no-install-recommends
|
8 |
|
9 |
# Add the unstable repository and its key
|
10 |
RUN echo "deb http://deb.debian.org/debian unstable main" > /etc/apt/sources.list.d/unstable.list && \
|
11 |
+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC && \
|
12 |
+
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
|
13 |
|
14 |
RUN apt-get install -y build-essential ffmpeg libsm6 libxext6
|
15 |
RUN apt-get update
|
16 |
RUN apt-get install -t unstable -y gdal-bin libgdal-dev
|
17 |
+
RUN apt-get install curl
|
18 |
|
19 |
RUN conda install -y python=3.10
|
20 |
|
|
|
27 |
USER user
|
28 |
|
29 |
ENV HOME=/home/user \
|
30 |
+
PATH=/home/user/.local/bin:$PATH
|
31 |
|
32 |
WORKDIR $HOME/app
|
33 |
|
|
|
47 |
|
48 |
EXPOSE 7860
|
49 |
|
50 |
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "localhost:7860" ]
|
51 |
+
|
52 |
CMD ["python", "main.py"]
|
main.py
CHANGED
@@ -50,7 +50,6 @@ def delete_files_in_directory(directory_path: str) -> None:
|
|
50 |
:param directory_path: Path to the directory
|
51 |
"""
|
52 |
if not os.path.exists(directory_path):
|
53 |
-
print("Tiles directory doesn't exist")
|
54 |
return
|
55 |
|
56 |
if not os.path.isdir(directory_path):
|
|
|
50 |
:param directory_path: Path to the directory
|
51 |
"""
|
52 |
if not os.path.exists(directory_path):
|
|
|
53 |
return
|
54 |
|
55 |
if not os.path.isdir(directory_path):
|