-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (20 loc) · 1000 Bytes
/
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
#FROM docker.io/python:3.9
FROM docker.io/python:3.11.1-slim
RUN buildDeps='locales curl' \
&& set -x \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
&& sed -i 's/^# en_US.UTF-8 UTF-8$/en_US.UTF-8 UTF-8/g' /etc/locale.gen \
&& sed -i 's/^# de_DE.UTF-8 UTF-8$/de_DE.UTF-8 UTF-8/g' /etc/locale.gen \
&& locale-gen en_US.UTF-8 de_DE.UTF-8 \
&& update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
ADD . /src
WORKDIR /src
# get qudt_units ontology
#RUN curl https://raw.githubusercontent.com/qudt/qudt-public-repo/main/vocab/unit/VOCAB_QUDT-UNITS-ALL-v2.1.ttl > ./ontologies/qudt_unit.ttl
COPY ./ontologies/qudt_unit.ttl ./ontologies/qudt_unit.ttl
ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
ENTRYPOINT ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000", "--workers", "6","--proxy-headers"]