Skip to content

Conversation

@IvanGrigorik
Copy link
Collaborator

@IvanGrigorik IvanGrigorik commented Nov 2, 2025

This PR suggest flexible Docker container, that can be used as a Docker developer container with tweaking all necessary secrets (SSH keys, default username and password, port exposure).

The secrets are added with default template, but they are not tracked by git in order to avoid accidental data exposure by doing something like git add ./

  • SSH key and port exposure needed to have direct connection.
    For example, if the container is located on remote server X - there is no need to connect to X and then connect to the container. You can do ssh -i [path to private SSH key] -p [DockerExposedPort] [username inside container or root]@[X address] or using ssh config 1.
  • Username and password needed if you don't want to work from sudouser mode
  • Container name

By default this data is templated, which means that if the user decided to leave the secrets as is - the Docker container will be builded with default values (root user, no SSH, no port exposure, limited functionality).

This allows using this container both as devcontainer and as default invocation container (as it was with pk script in the past, ./pk [PykokkosProgram])

Below is additional data, that may be needed for users or developers


It was my personal devcontainer (modified with all needed prompts) that I used for pykokkos and pykokkos-base installation for a couple of months.
Works both with the terminal and VS Code connection.

Footnotes

  1. SSH config, suggested for direct Docker devcontainer ssh connection
    Host [any alias for Docker container]
    HostName [actual server address]
    User [user name]
    Port [exposed port number]
    IdentityFile ~/.ssh/[path to private key]
    ControlMaster auto
    ServerAliveInterval 60
    ServerAliveCountMax 30
    TCPKeepAlive yes
    ForwardAgent yes
    StrictHostKeyChecking no
    That allows to connect to my Docker container like: ssh [Docker container alias]

@IvanGrigorik IvanGrigorik requested a review from gliga November 2, 2025 04:02
@IvanGrigorik
Copy link
Collaborator Author

Workflows are failing because of pykokkos-base is out-of-date.
Need to finish update pr (kokkos/pykokkos-base#70) first

@IvanGrigorik
Copy link
Collaborator Author

Now everything is ok

Copy link
Contributor

@JBludau JBludau left a comment

Choose a reason for hiding this comment

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

I think your editor is using the wrong file endings

@IvanGrigorik
Copy link
Collaborator Author

I think your editor is using the wrong file endings

I guess. Fixed

@IvanGrigorik
Copy link
Collaborator Author

@gliga @JBludau address this PR
If something is off, please comment
This PR is up for 2 months now, and I didn't get approval nor comments that something should be fixed.

@IvanGrigorik IvanGrigorik requested a review from JBludau December 18, 2025 19:18
@gliga
Copy link
Contributor

gliga commented Dec 19, 2025

@gliga @JBludau address this PR If something is off, please comment This PR is up for 2 months now, and I didn't get approval nor comments that something should be fixed.

It probably means that not right people were asked to review.

Is this running as part of any CI check?

@IvanGrigorik
Copy link
Collaborator Author

@gliga @JBludau address this PR If something is off, please comment This PR is up for 2 months now, and I didn't get approval nor comments that something should be fixed.

It probably means that not right people were asked to review.

Is this running as part of any CI check?

I am new in this project and don't know everyone. Would be happy if you suggest someone to review docker-related PRs


This PR does not include any CI for docker

@IvanGrigorik
Copy link
Collaborator Author

IvanGrigorik commented Dec 21, 2025

@gliga @JBludau I suggest to merge this PR now
In other PR I will add another Docker container with OpenMP and pk script
This container is CUDA-oriented and finally ready to work
AFAIK, this PR cant have any workflow, since its using CUDA and NVIDIA GPU

Copy link
Contributor

@gliga gliga left a comment

Choose a reason for hiding this comment

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

LG

@gliga
Copy link
Contributor

gliga commented Dec 21, 2025

@gliga @JBludau I suggest to merge this PR now In other PR I will add another Docker container with OpenMP and pk script This container is CUDA-oriented and finally ready to work AFAIK, this PR cant have any workflow, since its using CUDA and NVIDIA GPU

Note that CI runs do not need to run things end to end. Even checking the correctness of the dockerfile itself is a step up.

@IvanGrigorik IvanGrigorik force-pushed the grigorik/docker-devcontainer branch from 3420edc to ccb78f5 Compare December 22, 2025 20:58
@IvanGrigorik
Copy link
Collaborator Author

IvanGrigorik commented Dec 23, 2025

Everything is ready to merge now.

Add following CI runs:

  • dockerfile-build-test: tests if docker container can be built using Buildx action.
  • dockerfile-lint: tests dockerfile correctness using hadolint (docker linter).
  • shellcheck: check if there are some problems with bash/shell scripts using shellcheck.

@gliga can you re-approve this one?
Merge is blocked

@IvanGrigorik IvanGrigorik requested a review from gliga December 23, 2025 20:21
Copy link
Contributor

@gliga gliga left a comment

Choose a reason for hiding this comment

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

LG again

@gliga gliga merged commit 3f72e6a into main Dec 24, 2025
12 checks passed
@IvanGrigorik IvanGrigorik deleted the grigorik/docker-devcontainer branch December 24, 2025 23:47
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.

4 participants