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 1.6 KB

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  1. ARG BASE_IMAGE=tiangolo/uvicorn-gunicorn-fastapi:python3.10
  2. FROM ${BASE_IMAGE}
  3. # Gunicorn image 3.4G: https://github.com/tiangolo/uvicorn-gunicorn-docker/tree/master/docker-images
  4. LABEL org.opencontainers.image.source="https://github.com/MaastrichtU-IDS/translator-openpredict"
  5. # Change the current user to root and the working directory to /app
  6. USER root
  7. WORKDIR /app
  8. RUN apt-get update && \
  9. apt-get install -y build-essential wget curl vim && \
  10. pip install --upgrade pip
  11. # RUN curl -sSf https://rye-up.com/get | RYE_INSTALL_OPTION="--yes" bash
  12. ENV PORT=8808 \
  13. GUNICORN_CMD_ARGS="--preload" \
  14. PYTHONDONTWRITEBYTECODE=1 \
  15. PYTHONUNBUFFERED=1 \
  16. ACCESS_LOG="-" \
  17. ERROR_LOG="-" \
  18. OPENTELEMETRY_ENABLED=false
  19. # Use requirements.txt to install some dependencies only when needed
  20. # COPY requirements.txt .
  21. # RUN pip install -r requirements.txt
  22. ## Copy the source code (in the same folder as the Dockerfile)
  23. COPY . .
  24. ENV MODULE_NAME=trapi.main \
  25. VARIABLE_NAME=app
  26. # WORKDIR /app/trapi-openpredict
  27. # RUN pip install -e /app/predict-drug-target /app/trapi-predict-kit
  28. RUN pip install -e .
  29. # RUN pip install -e . /app/predict-drug-target /app/trapi-predict-kit
  30. # RUN pip install -e /app/trapi-predict-kit
  31. RUN dvc pull -f
  32. EXPOSE 8808
  33. # ENTRYPOINT [ "gunicorn", "-w", "8", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8808", "src.trapi_oprenpredict.main:app"]
  34. # Build entrypoint script to pull latest dvc changes before startup
  35. RUN echo "#!/bin/bash" > /entrypoint.sh && \
  36. echo "dvc pull" >> /entrypoint.sh && \
  37. echo "/start.sh" >> /entrypoint.sh && \
  38. chmod +x /entrypoint.sh
  39. CMD [ "/entrypoint.sh" ]
Tip!

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

Comments

Loading...