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

Adding sample slides, for different Python projects #23

Merged
merged 4 commits into from
May 19, 2023

Conversation

ranms25
Copy link
Contributor

@ranms25 ranms25 commented Apr 28, 2023

Adding sample slides, for different Python projects. I tried to change some things and try to make different variations, so that in every project there are changes in terms of writing, but the idea is the same.

```
$ git clone https://github.com/Cosmo-Tech/CosmoTech-Acceleration-Library.git
$ cd CosmoTech-Acceleration-Library
$ docker run -t -i --name cosmotech-acceleration-library-dev -v /opt/CosmoTech-Acceleration-Library -v /C:/Users/YourUserName/CosmoTech-Acceleration-Library:/opt python:3.11 bash
Copy link
Owner

@szabgab szabgab Apr 28, 2023

Choose a reason for hiding this comment

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

Why are there two -v parameters? The 2nd one is for Windows, right? Please include examples for both Linux and Windows using %cd%.

Copy link
Contributor Author

@ranms25 ranms25 Apr 28, 2023

Choose a reason for hiding this comment

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

Maybe is realted to that I ran it on Git Bash?
I didn't ran that on CMD or power sheell.

I tried with w but get errors, and try to fix it but it didn't work:
docker run -it --name cosmotech-acceleration-library-dev -w /opt -v /C:/Users/Ran/CosmoTech-Acceleration-Library:/opt python:3.11 bash
docker: Error response from daemon: the working directory 'C:/Program Files/Git/opt' is invalid, it needs to be an absolute path.
See 'docker run --help'.

docker run -it --name cosmotech-acceleration-library-dev -w /opt -v %cd%:/opt python:3.11 bash
docker: Error response from daemon: the working directory 'C:/Program Files/Git/opt' is invalid, it needs to be an absolute path.
See 'docker run --help'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And I'm quite confused, what is meant to do more for Linux? I was working with Windows, but I ran everything through Git Bash and it worked fine for me with no problems.

Copy link
Owner

Choose a reason for hiding this comment

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

I could not run docker from git bash properly either. Only CMD and PowerShell

$ cd CosmoTech-Acceleration-Library
$ docker run -t -i --name cosmotech-acceleration-library-dev -v /opt/CosmoTech-Acceleration-Library -v /C:/Users/YourUserName/CosmoTech-Acceleration-Library:/opt python:3.11 bash

# cd opt
Copy link
Owner

Choose a reason for hiding this comment

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

if -w /opt is provided on the command line of docker run then there is no need for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

again it didn't worked for me

```
$ git clone https://github.com/mobility-team/mobility.git
$ cd mobility
$ docker run -t -i --name mobility-dev -v /opt/mobility -v /C:/Users/YourUserName/mobility:/opt python:3.9 bash
Copy link
Owner

@szabgab szabgab Apr 28, 2023

Choose a reason for hiding this comment

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

as above

why python 3.9 and not 3.11?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the demand was for python_requires=">=3.9"
So I chose 3.9, becasue somtimes the update version did errors in the tests

ranms25 and others added 3 commits May 1, 2023 11:47
Improving the instructions for setting up a Docker environment to be more specific for windows (cmd and powershell) and also for linux
@szabgab szabgab merged commit aa339ce into szabgab:main May 19, 2023
5 of 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.

None yet

2 participants