-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·37 lines (24 loc) · 886 Bytes
/
Copy pathDockerfile
File metadata and controls
executable file
·37 lines (24 loc) · 886 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
31
32
33
34
35
36
37
ARG BASE_VERSION=python:3.12
# evaluation-function-base's python image bundles the shimmy binary,
# the Lambda RIE, and the entrypoint.sh that picks between them.
FROM ghcr.io/lambda-feedback/evaluation-function-base/${BASE_VERSION}
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
COPY requirements.txt .
RUN pip install -r requirements.txt
# Precompile python files for faster startup
RUN python -m compileall -q .
# Copy the function code
COPY src ./src
COPY index.py .
COPY tests ./tests
# Command shimmy uses to start the chat function worker
ENV FUNCTION_COMMAND="python"
# Args to start the chat function worker with
ENV FUNCTION_ARGS="index.py"
# The transport to use for the RPC server
ENV FUNCTION_RPC_TRANSPORT="ipc"
ENV FUNCTION_WORKER_SEND_TIMEOUT="170s"
ENV LOG_LEVEL="debug"