Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pythonnet Docker images #322

Closed
cowboygneox opened this issue Jan 10, 2017 · 29 comments
Closed

Pythonnet Docker images #322

cowboygneox opened this issue Jan 10, 2017 · 29 comments
Milestone

Comments

@cowboygneox
Copy link
Contributor

cowboygneox commented Jan 10, 2017

Hey guys,

For my Docker infrastructure, I threw together a couple of Docker images that will make it way easier to develop, test, and distribute code that leverages pythonnet. I think this would benefit most people in a Docker-based CI environment (ex. Gitlab), but I expect this will help others as well.

If you're interested in combining efforts on this, let me know!

https://hub.docker.com/r/cowboygneox/pythonnet/
https://github.com/cowboygneox/pythonnet-docker

@den-run-ai
Copy link
Contributor

related:

#240

#303

cc @benley @AlexCatarino @jaredbroad

@den-run-ai
Copy link
Contributor

@cowboygneox are you able to both extend and embed pythonnet using these docker images?

@cowboygneox
Copy link
Contributor Author

cowboygneox commented Jan 10, 2017

@denfromufa "extend" and "embed" are ambiguous terms in my scattered brain. I believe that what I've produced is "embedded", since I already installed pythonnet 2.1.0 within the container. Any future pip install pythonnet==2.1.0 and the requirement will be already satisfied.

As for "extend", I'm not sure what you are looking for. Can you elaborate?

@benley
Copy link

benley commented Jan 10, 2017

I'm no longer working at the company where I was using pythonnet, so I probably won't be maintaining my Dockerfile variant in the future. Please feel free to fork/extend/take-over from https://github.com/benley/docker-wine-python-dotnet if it's of any use to you!

@den-run-ai
Copy link
Contributor

@cowboygneox are you able to both extend and embed pythonnet using these docker images?

embedding and extending are terms used in CPython C-API:

https://docs.python.org/3/extending/

@cowboygneox
Copy link
Contributor Author

@denfromufa It is my understanding that Docker does not prevent either. If you can do it with Python's Docker image, then mine is no different.

@cowboygneox
Copy link
Contributor Author

@denfromufa I don't want this to fallout of short-term view. Are you interested in converging this effort somehow?

@den-run-ai
Copy link
Contributor

@cowboygneox I'm interested in converging the effort, but after v2.2.0 release.

@cowboygneox
Copy link
Contributor Author

@denfromufa Ping me when ready.

@den-run-ai den-run-ai added this to the 2.3.0 milestone Feb 2, 2017
@vmuriart
Copy link
Contributor

@cowboygneox your latest recipe doesn't need to include the pythonnet source code anymore right?

@cowboygneox
Copy link
Contributor Author

@vmuriart Correct. I just uploaded the latest today to use Mono 4.8 and pythonnet 2.2.2. https://hub.docker.com/r/cowboygneox/pythonnet/

@vmuriart
Copy link
Contributor

Yup, I noticed them while browsing 👍. Forewarning, I have limited docker knowledge so bare with me.

What do we need to combine efforts (not sure what you meant by this)?
I think you meant in relation to #240 to combine efforts, or was it to include a sample copy of the docker recipes?

@cowboygneox
Copy link
Contributor Author

@vmuriart I'm suggesting that pythonnet make an official group on Docker Hub and updates various Docker images that have environments all configured and ready to go.

Using Docker has saved me a ton of time in configuring environments, and no matter how hard your team works to make the bridge of Python to .NET easy to install and manage, Docker will always be easier.

I can help if you'd like me to. I'm pretty much already doing it, and it's not a lot of effort to share.

@vmuriart
Copy link
Contributor

@cowboygneox thanks for the explanation and offer to help! Docker doesn't play nice with my computer so I don't have much experience with it, so your help is appreciated.

@denfromufa do we already have a docker group account? I don't want to cause another nameclash mess like coverity's.

Looks like the common practice (atleast from the links posted in #240) is to have a separate repo exclusive for the docker images/recipes. I made a repo for this (https://github.com/pythonnet/pythonnet-docker). So next steps would be

@den-run-ai
Copy link
Contributor

@vmuriart @cowboygneox I created pythonnet account, but cannot convert it to organization. See the error in screenshot below. So I created pythondotnet organization and added you both there:

cloud.docker.com/app/pythondotnet

image

@vmuriart
Copy link
Contributor

isn't the account name you created pythonnet? looks like you are putting your own username.

@den-run-ai
Copy link
Contributor

@vmuriart yes, I created pythonnet, but in order to convert it to organization, I had to create username denfromufa and link it during this step in the screenshot above. For some reason docker cloud thinks that denfromufa is not a valid Docker ID. Anyway use either pythonnet or pythondotnet for now. You are in both accounts. I will try to convert pythonnet to organization tomorrow.

Looking back I should have created denfromufa and then pythonnet organization from within it.

@cowboygneox
Copy link
Contributor Author

@denfromufa Let me know if you get a pythonnet org. I'll get started on the images to send a PR for.

@den-run-ai
Copy link
Contributor

@cowboygneox @vmuriart here is the issue I posted on docker forum:

https://forums.docker.com/t/cannot-convert-docker-cloud-account-pythonnet-to-organization/28975

only commercial users can contact support directly.

@cowboygneox
Copy link
Contributor Author

Made a pull request and pushed some images to Docker: pythonnet/pythonnet-docker#1

@vmuriart
Copy link
Contributor

fixed the group pythonnet and made it an organization. We can use it now instead of pythondotnet

@den-run-ai
Copy link
Contributor

Can you add all of us to the team?

@den-run-ai
Copy link
Contributor

den-run-ai commented Feb 27, 2017 via email

@vmuriart
Copy link
Contributor

yup account its all setup. only thing left is to figure out why its using my gravatar

@den-run-ai
Copy link
Contributor

ok after many hiccups my docker installation is working on windows 10!

C:\WINDOWS\system32>docker pull cowboygneox/pythonnet:python3.5-mono4.8.0-pythonnet2.2.2
python3.5-mono4.8.0-pythonnet2.2.2: Pulling from cowboygneox/pythonnet
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
9c1bc3c30371: Pull complete
e4b99677d005: Pull complete
639fdf1f74a8: Pull complete
17fa6c425d9b: Pull complete
377d339bc856: Pull complete
81f488ccdd45: Pull complete
Digest: sha256:77eea1143b6ca58d995cb3f6ec8675b41af0450f804e266c9cb0f3d3259f34c6
Status: Downloaded newer image for cowboygneox/pythonnet:python3.5-mono4.8.0-pythonnet2.2.2


C:\WINDOWS\system32>docker run -it cowboygneox/pythonnet:python3.5-mono4.8.0-pythonnet2.2.2 sh
# python
Python 3.5.3 (default, Feb 10 2017, 02:09:54)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.__version__
'2.2.2'
>>>

@vmuriart
Copy link
Contributor

vmuriart commented Mar 3, 2017

@cowboygneox thanks for including the shell script to build and deploy. Images are now on https://hub.docker.com/r/pythonnet/pythonnet/tags/

I deleted the images from pythondotnet to avoid confusion, but I can't figure out how to delete that organization.

@vmuriart vmuriart closed this as completed Mar 3, 2017
@den-run-ai
Copy link
Contributor

I updated installation options:

https://github.com/pythonnet/pythonnet/wiki/Installation

@vkhombal
Copy link

vkhombal commented May 4, 2018

Hello all,
What are the current docker instructions?

@den-run-ai
Copy link
Contributor

@vkhombal there are some docker images as of last year (see wiki), but we are experiencing some permission issues with latest docker builds in 2018:

pythonnet/pythonnet-docker#5

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

No branches or pull requests

5 participants