-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (20 loc) · 901 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
FROM python:3.12 as requirements-stage
WORKDIR /tmp
RUN pip install poetry
COPY ./pyproject.toml ./poetry.lock* /tmp/
# TODO: create empty requirements.txt here?
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
FROM python:3.12
WORKDIR /code
COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
# ENV PATH /home/${USERNAME}/.local/bin:${PATH}
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# TODO: switch below to .env and using helper.config_loader
COPY local_assets/private_config.json /code/local_assets/private_config.json
COPY ./src /code/src
COPY ./data /code/data
COPY .config/config.yml /code/.config/config.yml
# COPY ./app /code/app
CMD ["python", "src/main.py"]
# CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "80"]
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]