-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (28 loc) · 1.39 KB
/
Dockerfile
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
FROM python:3.12-slim as requirements-stage
WORKDIR /tmp
RUN pip install poetry
COPY ./pyproject.toml ./poetry.lock* /tmp/
RUN poetry export -f requirements.txt --output requirements.txt --without=dev --without-hashes
FROM python:3.12-slim
LABEL maintainer="Luchesar ILIEV <[email protected]>" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.description="A web-based spectra harmonization tool" \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.schema-version="1.0" \
org.opencontainers.image.source="https://github.com/h2020charisma/spectrastream" \
org.opencontainers.image.title="spectrastream" \
org.opencontainers.image.url="https://github.com/h2020charisma/spectrastream/blob/main/README.md" \
org.opencontainers.image.vendor="IDEAconsult" \
org.opencontainers.image.version="latest"
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=requirements-stage /tmp/requirements.txt /tmp/
RUN sed -i 's/^-e //' /tmp/requirements.txt \
&& pip install --no-cache-dir --upgrade -r /tmp/requirements.txt \
&& rm /tmp/requirements.txt
COPY ./src/spectrastream /app
WORKDIR /app
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://127.0.0.1:8501/_stcore/health
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]