Skip to content

Add a Dockerfile to support silq in a container#32

Open
j6k4m8 wants to merge 1 commit intosilq-lang:masterfrom
j6k4m8:patch-1
Open

Add a Dockerfile to support silq in a container#32
j6k4m8 wants to merge 1 commit intosilq-lang:masterfrom
j6k4m8:patch-1

Conversation

@j6k4m8
Copy link
Copy Markdown

@j6k4m8 j6k4m8 commented Dec 1, 2021

This PR adds a Silq Dockerfile to support running Silq experiments inside of a container. It doesn't add anything to the overhead of the codebase, and clones the latest from this repository when built (i.e., is not version-pinned, but will always be up-to-date).

I have been using this for a little while and saw #24, and thought I'd contribute. Feel free to close if you prefer not to have this in the repository!

LABEL description="Silq is a high-level programming language for quantum computing with a strong static type system."

RUN apt update
RUN apt install -y git ldc
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason this installs ldc? (dependencies-release.sh automatically fetches a compatible version of ldc into a local folder.)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi @tgehr — sorry for the delay here! I tried originally without this explicit installation line and it looked like the install was missing ldmd2:

./build-release.sh: line 18: ldmd2: command not found

I will confess that I'm completely new to Dlang so it's possible that this is just an alias for a tool that I do have in the container... I'm just not quite sure :) With the ldc install added here, it does indeed succeed.

@tgehr
Copy link
Copy Markdown
Collaborator

tgehr commented Dec 1, 2021

Thanks! I wanted to do this myself but did not get around to it. This is what I have been using for a project that is set up almost the same way as Silq (Silq was forked from it):
https://github.com/eth-sri/psi/blob/master/Dockerfile

I don't regularly run docker so I might have done something silly, but maybe you can have a look there for inspiration. Also, the documentation would need to be updated, e.g. like this:
https://github.com/eth-sri/psi/blob/master/README.md

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.

2 participants