-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDockerfile
37 lines (28 loc) · 897 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
27
28
29
30
31
32
33
34
35
36
#
FROM --platform=linux/amd64 python:3.11
#
ARG YAML_CONFIG_STR
ENV YAML_CONFIG_STR=${YAML_CONFIG_STR}
#
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
RUN curl https://packages.microsoft.com/config/debian/12/prod.list | tee /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql18
#
WORKDIR /code
#
COPY poetry.lock pyproject.toml /code/
#
RUN pip install --no-cache-dir --upgrade poetry
RUN poetry config virtualenvs.create false && poetry install --no-dev
#
COPY ./common /code/common
COPY ./static /code/static
COPY ./templates /code/templates
COPY ./logic/ /code/logic
COPY ./routers/ /code/routers
COPY ./*.py /code
RUN python /code/download_model.py
RUN rm /code/model.zip
EXPOSE 5000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]