File size: 1,116 Bytes
dad6e1e
d48b6bc
 
 
a3e4ec3
974f792
 
465694c
4d1a958
 
 
974f792
6563efc
 
5cc0da5
 
d48b6bc
6563efc
67c3457
d48b6bc
 
5cc0da5
 
 
 
ab10410
5778d19
 
465694c
 
 
5778d19
eb30136
5cc0da5
d48b6bc
 
 
1fcff8c
 
d48b6bc
e3aa147
e08c88c
7056a58
e08c88c
56e1504
 
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
FROM python:3.11.7

WORKDIR /code

# Copy the Python code from the xsadcp repository
RUN apt-get update \
    && apt-get install -y wget tar \
    && wget https://github.com/SADCPVIEW/xsadcp/archive/refs/tags/0.11.tar.gz \
    && tar -xzvf 0.11.tar.gz \
    && mv xsadcp-0.11 xsadcp \
    && rm 0.11.tar.gz
    
COPY . .    

# install python softwares.  

RUN python3 -m pip install --no-cache-dir --upgrade pip
RUN python3 -m pip install --no-cache-dir --upgrade -r /code/xsadcp/requirements.txt
RUN python3 -m pip install /code/xsadcp/.

COPY . .


WORKDIR /code/xsadcp 

# Add step to download data.tar from URL and extract its contents to /data/
RUN mkdir data \
    && chmod 777 data \
    && wget https://data-eurogoship.ifremer.fr/data.tar \
    && tar -xvf data.tar -C data/ \
    && rm data.tar \
    && ls data/

CMD ["panel", "serve", "xsadcp/app.py", "--warm", "--address", "0.0.0.0", "--port", "7860",  "--allow-websocket-origin", "*"]

RUN mkdir /.cache
RUN chmod 777 /.cache
RUN mkdir /.config
RUN chmod 777 /.config
RUN mkdir .chroma
RUN chmod 777 .chroma
RUN mkdir /.local
RUN chmod 777 /.local