and the machine type my-agent show in dropdown list,
however, when chosing to use this type,
the machine never get start successfully.
can anyone help:
where can i find the log about the agent machine starting detail?
docker:
network: datalore-agents-network
dataloreHost: datalore
instances:
- id: 1
default: true
label: "your-name"
description: "your-description"
image: docker.io/jetbrains/datalore-agent:2023.1
deviceRequests:
# I put in a GPU here. You don't have to.
Everything is basically the default recommendation from the documentation.
thanks!
finally i made it out, it is something conflict on my image definition(I guess).
for anyone come across this, following is my procedure:
build image using “docker build -t my-agent:xxx .”
1.1 becareful with the Dockerfile content(I am not quite sure and not know the cause, but it did help me)
* not to change the owner of path /home/datalore
* change back user to datalore (DO NOT leave root in last statement)
1.2 make small steps every time in the Dockerfiler, and give enough test(build and start machine using the custom image)
1.3 some experiences:
* for programe need to create path in home dir, use root to mkdir then chown the path, and change back to datalore
the Dockerfile example:
FROM jetbrains/datalore-agent:2023.1
LABEL maintainer="xxxx"
USER root
RUN mkdir -p /opt/software
RUN chown datalore:datalore /opt/software
# end of ====tag:mkdir======
USER datalore
# RUN curl -LO https://archive.apache.org/dist/spark/spark-3.3.0/spark-3.3.0-bin-hadoop3-scala2.13.tgz
COPY --chown=datalore:datalore ./spark-3.3.0-bin-hadoop3-scala2.13.tgz /opt/software
RUN tar -xvf /opt/software/spark-3.3.0-bin-hadoop3-scala2.13.tgz -C /opt/software
RUN ln -s /opt/software/spark-3.3.0-bin-hadoop3-scala2.13 /opt/software/spark
ENV SPARK_HOME=/opt/software/spark
USER datalore
# RUN /opt/python/envs/minimal/bin/pip install pyspark==3.3.0
COPY ./pyspark-3.3.0.tar.gz /opt/software
RUN /opt/python/envs/minimal/bin/pip install /opt/software/pyspark-3.3.0.tar.gz
# end of ====tag:spark======
USER datalore
# RUN /opt/python/envs/minimal/bin/pip install playwright==1.31.1
COPY ./playwright-1.30.0-py3-none-manylinux1_x86_64.whl /opt/software
RUN /opt/python/envs/minimal/bin/pip install /opt/software/playwright-1.30.0-py3-none-manylinux1_x86_64.whl
USER root
RUN mkdir -p /home/datalore/.cache
RUN chown datalore:datalore /home/datalore/.cache
USER datalore
RUN /opt/python/envs/minimal/bin/playwright install chromium
# end of ====tag:playwright======
tag the image to another name and use it in the agents-config.yaml
using mounted volume in docker-compose.yaml(not agents-config, it is used by datalore server not agent) to do this , docker compose file like