My test container correctly writes the two txt files i use to test the container to the /output mount, which appear in the build directory (/home/almalinux/xnat-docker-compose/xnat-data/build/*/output/), but theCSP fails to upload them to the archive (/home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/resources/ciao-output/).
The error is: Failed to upload required outputs. Container: Could not upload files to resource: Unable to find the following source files/folders: /output
the container logs shows
root
[DEBUG] Output path: /output/ciao.txt
[DEBUG] /output exists: True
[DEBUG] /output writable: True
[DEBUG] /output permissions: drwxr-x---
[DEBUG] Wrote file to /output/ciao.txt, permissions: -rwxrwxrwx
total 8
-rwxrwxrwx. 1 root root 5 Oct 1 19:24 ciao.txt
-rw-r--r--. 1 root root 27 Oct 1 19:24 debug.txt
the json command is
{
"name": "ciao-writer",
"label": "Write ciao.txt to Project",
"description": "Runs ciao-image and saves results to a Project Resource.",
"version": "1.0",
"schema-version": "1.0",
"image": "ciao-image:1.2",
"type": "docker",
"command-line": "whoami && python /app/save_ciao.py && ls -l /output",
"override-entrypoint": true,
"run-as-user": "root",
"mounts": [
{
"name": "out",
"writable": true,
"path": "/output"
}
],
"environment-variables": {},
"ports": {},
"inputs": [],
"outputs": [
{
"name": "txt_out",
"description": "All text files written to /output",
"required": true,
"mount": "out",
"path": "/output",
"glob": "*.txt"
}
],
"xnat": [
{
"name": "project",
"label": "ciao Project",
"description": "Launch at a Project and save results to a Project resource",
"contexts": ["xnat:projectData"],
"external-inputs": [
{
"name": "project",
"description": "Target project",
"type": "Project",
"required": true,
"load-children": true
}
],
"derived-inputs": [],
"output-handlers": [
{
"name": "save_to_project_resource",
"accepts-command-output": "txt_out",
"as-a-child-of": "project",
"type": "Resource",
"label": "ciao-output",
"tags": [],
"create-if-not-exists": true
}
]
}
],
"container-labels": {},
"generic-resources": {},
"ulimits": {},
"secrets": [],
"visibility": "public"
}
the paths are set like this
Paths:- Build: /home/almalinux/xnat-docker-compose/xnat-data/build/
- Archive: /home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/resources/ciao-output/
- CSP Path Translation:
- XNAT Path Prefix: /data/xnat
- Docker Server Path Prefix: /home/almalinux/xnat-docker-compose/xnat-data/home
- XNAT Site Paths:
- Build Path: /data/xnat/build
- Archive Path: /data/xnat/archive
i think i messed up with the permissions but i am not sure what is causing the problem. at the moment they are
Permissions:- Parent: /home/almalinux/xnat-docker-compose/: drwxr-x--- almalinux:almalinux
- Build: /home/almalinux/xnat-docker-compose/xnat-data/build/*/output/: drwxr-x--- or drwxrwxrwx root:root (after chmod 777)
- Archive:
- /home/almalinux/xnat-docker-compose/xnat-data/archive/: drwxrwxrwx root:root
- /home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/: drwxrwxrwx root:root
- /home/almalinux/xnat-docker-compose/xnat-data/archive/projects/ProgettoPilota/resources/ciao-output/: drwxrwxrwx almalinux:almalinux
any advice?