Remove python checks and deps from custom server #3462
Annotations
2 errors
test_serving_image_builder.test_serving_image_dockerfile_from_user_base_image:
truss/tests/contexts/image_builder/test_serving_image_builder.py#L53
assert ['ARG PYVERSI... 1; }\n', ...] == ['ARG PYVERSI... 1; }\n', ...]
At index 2 diff: '# If user base image is supplied in config, apply build commands from truss base image\n' != 'ENV PYTHON_EXECUTABLE="/usr/local/bin/python3"\n'
Full diff:
[
'ARG PYVERSION=py39\n',
'FROM baseten/truss-server-base:3.9-v0.4.3 AS truss_server\n',
- 'ENV PYTHON_EXECUTABLE="/usr/local/bin/python3"\n',
+ '# If user base image is supplied in config, apply build commands from truss '
+ 'base image\n',
'RUN grep -w \'ID=debian\\|ID_LIKE=debian\' /etc/os-release || { echo "ERROR: '
'Supplied base image is not a debian image"; exit 1; }\n',
'RUN $PYTHON_EXECUTABLE -c "import sys; sys.exit(0) if sys.version_info.major '
'== 3 and sys.version_info.minor >=8 and sys.version_info.minor <=12 else '
'sys.exit(1)" \\\n',
' || { echo "ERROR: Supplied base image does not have 3.8 <= python <= '
'3.12"; exit 1; }\n',
+ 'ENV PYTHON_EXECUTABLE="/usr/local/bin/python3"\n',
'RUN pip install --upgrade pip --no-cache-dir \\\n',
' && rm -rf /root/.cache/pip\n',
- '# If user base image is supplied in config, apply build commands from truss '
- 'base image\n',
'ENV PYTHONUNBUFFERED="True"\n',
'ENV DEBIAN_FRONTEND="noninteractive"\n',
'RUN apt update && \\\n',
' apt install -y bash \\\n',
' build-essential \\\n',
' git \\\n',
' curl \\\n',
' ca-certificates \\\n',
' software-properties-common \\\n',
' && apt-get autoremove -y \\\n',
' && apt-get clean -y \\\n',
' && rm -rf /var/lib/apt/lists/*\n',
'COPY ./base_server_requirements.txt base_server_requirements.txt\n',
'RUN pip install -r base_server_requirements.txt --no-cache-dir && rm -rf '
'/root/.cache/pip\n',
'COPY ./requirements.txt requirements.txt\n',
'RUN cat requirements.txt\n',
'RUN pip install -r requirements.txt --no-cache-dir && rm -rf '
'/root/.cache/pip\n',
'ENV APP_HOME="/app"\n',
'WORKDIR $APP_HOME\n',
'# Copy data before code for better caching\n',
'COPY ./data /app/data\n',
'COPY ./server /app\n',
'COPY ./config.yaml /app/config.yaml\n',
'COPY ./model /app/model\n',
'COPY ./packages /packages\n',
'ENV INFERENCE_SERVER_PORT="8080"\n',
'ENV SERVER_START_CMD="/usr/local/bin/python3 /app/main.py"\n',
'ENTRYPOINT ["/usr/local/bin/python3", "/app/main.py"]\n',
]
|
test
Process completed with exit code 1.
|