Skip to content

Conversation

coretl
Copy link
Contributor

@coretl coretl commented Oct 1, 2025

Fixes #294

@coretl coretl requested a review from gilesknap October 1, 2025 15:34
@coretl
Copy link
Contributor Author

coretl commented Oct 1, 2025

Test error will be fixed by #296

@coretl coretl marked this pull request as draft October 2, 2025 08:15
@coretl coretl marked this pull request as ready for review October 2, 2025 08:31
@gilesknap
Copy link
Contributor

I have tested this against
https://github.com/DiamondLightSource/fastcs-example/tree/dev-in-cluster

All is working great and I can deploy the runtime container to the cluster like so:
https://github.com/DiamondLightSource/fastcs-example/tree/dev-in-cluster

HOWEVER: the debug container fails to start in cluster with:

bash: line 1: fastcs-example: command not found

Which is because this line in the runtime is not applied to the debug target:

PATH=/app/.venv/bin:$PATH

@gilesknap
Copy link
Contributor

gilesknap commented Oct 2, 2025

I believe we just need to add this to the build stage:

PATH=/app/.venv/bin:$PATH

trying it in fastcs-example.

@gilesknap
Copy link
Contributor

Adding the Path in the debug phase does fix the issue. It also repeats the same line but I figure that is required as the two stages have differing base images.

@gilesknap
Copy link
Contributor

gilesknap commented Oct 2, 2025

Another question. I have put sdtio-socket in fastcs-example dependencies and set the args as below:

ioc-instance:
  image: ghcr.io/diamondlightsource/fastcs-example-debug:2025.10.1
  args:
    - stdio-socket --ptty "fastcs-example run /epics/ioc/config/controller.yaml"

This gives us ability to connect to the console from a shell in the container. The dependency could go in the copier template and be available to all. Do we want that?

@gilesknap
Copy link
Contributor

gilesknap commented Oct 2, 2025

I have seen a non-critical problem which is that when you use the debug container and you are not root you don't get all the nice .inputrc etc. because you can't read the /root folder.

I've been changing the HOME variable to /tmp so ipython has a place to write its files. I thought that was why I was not seeing the friendly shell but it turns out I cant see it even with HOME=/root. It would be nice to have a solution that gives writable dot files and nice bash config.

The simplest answer is to make the /root folder writeable by all at build time. I feel that is mildly dangerous though.

Maybe the best way to handle this is to not support fancy bashrc in cluster. You have console which gets you into a nice interactive python session anyway.

@gilesknap
Copy link
Contributor

It looks like the README is out of date, still mentioning pip et al. I have not checked the docs yet.

@coretl
Copy link
Contributor Author

coretl commented Oct 2, 2025

Another question. I have put sdtio-socket in fastcs-example dependencies and set the args as below:

ioc-instance:
  image: ghcr.io/diamondlightsource/fastcs-example-debug:2025.10.1
  args:
    - stdio-socket --ptty "fastcs-example run /epics/ioc/config/controller.yaml"

This gives us ability to connect to the console from a shell in the container. The dependency could go in the copier template and be available to all. Do we want that?

I think this is probably too specific to go in the copier template, best to leave it in the FastCS modules

@coretl
Copy link
Contributor Author

coretl commented Oct 2, 2025

It looks like the README is out of date, still mentioning pip et al. I have not checked the docs yet.

Fixed

Copy link
Contributor

@gilesknap gilesknap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@coretl
Copy link
Contributor Author

coretl commented Oct 2, 2025

I have seen a non-critical problem which is that when you use the debug container and you are not root you don't get all the nice .inputrc etc. because you can't read the /root folder.

I've been changing the HOME variable to /tmp so ipython has a place to write its files. I thought that was why I was not seeing the friendly shell but it turns out I cant see it even with HOME=/root. It would be nice to have a solution that gives writable dot files and nice bash config.

The simplest answer is to make the /root folder writeable by all at build time. I feel that is mildly dangerous though.

Maybe the best way to handle this is to not support fancy bashrc in cluster. You have console which gets you into a nice interactive python session anyway.

We could make it writable to all just for the debug container? That should be reasonably safe...

@coretl coretl merged commit 7659ef5 into main Oct 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

app folder referenced in Dockerfile of 5.0.0a1 not created
2 participants