Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile 807 B

You have to be logged in to leave a comment. Sign In
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
  1. ARG PYTHON_VERSION=3.12.2
  2. ARG PORT=8000
  3. FROM python:${PYTHON_VERSION} as requirements-stage
  4. WORKDIR /tmp
  5. RUN pip install poetry
  6. COPY ./pyproject.toml ./poetry.lock* /tmp/
  7. RUN pip install --upgrade pip setuptools wheel
  8. RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
  9. FROM python:${PYTHON_VERSION} as runner
  10. # Prevents Python from writing pyc files to disc
  11. ENV PYTHONDONTWRITEBYTECODE=1
  12. # Prevents Python from buffering stdout and stderr
  13. ENV PYTHONUNBUFFERED=1
  14. WORKDIR /code
  15. COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
  16. RUN apt-get update && apt-get install -y libhdf5-dev
  17. RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
  18. COPY . /code
  19. CMD ["uvicorn", "src.serve.main:app", "--host", "0.0.0.0", "--port", "8000"]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...