-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 784 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 784 Bytes
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
# Use RENCI python base image
FROM ghcr.io/translatorsri/renci-python-image:3.12.4
# Add image info
LABEL org.opencontainers.image.source https://github.com/ranking-agent/strider
ENV PYTHONHASHSEED=0
# set up requirements
WORKDIR /app
# make sure all is writeable for the nru USER later on
RUN chmod -R 777 .
# Install requirements
ADD requirements-lock.txt .
RUN pip install -r requirements-lock.txt
# switch to the non-root user (nru). defined in the base image
USER nru
# Copy in files
ADD . .
# Set up base for command and any variables
# that shouldn't be modified
ENTRYPOINT ["gunicorn", "strider.server:APP", "-k", "uvicorn.workers.UvicornWorker", "--timeout", "0"]
# Variables that can be overriden
CMD [ "--bind", "0.0.0.0:5781", "--workers", "4", "--threads", "3"]