[PYTHON] docker and PyCharm under proxy on windows

--The proxy is http://proxy.any.ac.jp:8080/

docker

Advance preparation

-Sign up at Docker cloud --Create Repository (example: username / rep) --It doesn't matter whether it's private or public, but if it's public, it will be easier later instead of making it public.

Until initial startup

-Install Docker Toolbox --Variable name HTTP_PROXY, value http://proxy.any.ac.jp:8080/ in Windows environment variables --Similarly variable name HTTPS_PROXY, value http://proxy.any.ac.jp:8080/ --Launch Docker Quickstart Terminal --If you can see the whale safely, do the following

export HTTP_PROXY=http://proxy.any.ac.jp:8080/
export HTTPS_PROXY=$HTTP_PROXY

Until the initial environment construction

--docker run -it --name env <centos, ubuntu, python, etc.> / bin / bash --Since you can put it in a virtual environment, you can play around with it freely. ――Do not include the project to be executed here ――To build only the execution environment --In the case of creating a user and building an environment there

ln -s /home/User/.hogebrew/var/pyenv/shims/python /usr/bin/python
ln -s /home/User/.linuxfuga/bin/jumanpp /usr/bin/jumanpp

** Allow root to run through unedited .bash_profile **

--When you can build the environment until you feel like it, exit with C-d and execute the following

docker login #Log in to your docker cloud
docker commit lab username/rep:latest
docker push username/rep:latest

――Once you have built the environment, you do not have to use another PC.

PyCharm -Download from PyCharm --Free for students. Please refer to other places --Once started, select Configure-> Settings at the bottom right for the time being

Settings --Move to Project Interpreter --Push the gear in Project Interpreter and Add remote --Select Docker, New ... --Keep the default settings and make sure VirtualBox shared folders is / c / Users-> C: \ Users

Edit Configuration --Return to the first screen and select a project --Right click on the Python File you want to run-> run filename ――Be scolded. Cancel as it is --Run-> Edit Configuration on the toolbar --I think there is a filename in the Python item, so select it --Changed Script from C: \ Users ... to \ c \ Users ... --Similarly change the Working directory to \ c \ Users ... --Go to Docker container settings - Volume bindings - /opt/project -> C:\Users...\project_path --Set resources here - Environment variables - http_proxy -> http://proxy.any.ac.jp:8080/ - https_proxy -> http://proxy.any.ac.jp:8080/ - OK

-v /c/Users.../project_path ...

Program start

――I think it works --Set for each file. If you find it annoying, you can play with Defaults, but if you use a program that runs on Windows, it is better to put Python in Windows and run it, so be careful.

Recommended Posts

docker and PyCharm under proxy on windows
Docker under proxy environment
Use Python on Windows (PyCharm)
Using Docker (Hyper-V) with PyCharm on Windows 10 (as of August 2017)
Python 3.6 on Windows ... and to Xamarin.
Pip install (Windows) under Proxy environment
Build and install OpenCV on Windows
Integrate Modelica and Python on Windows
Mastering pip and wheel on windows
Install easy_install and pip on windows
[UE4] Build DedicatedServer on Windows and Linux
Install wsl2 and master linux on windows
Link WAS and FLASK applications on docker
Run py.test on Windows Anaconda and MinGW
Run matplotlib on a Windows Docker container
Install and run Python3.5 + NumPy + SciPy on Windows 10
(Windows) Causes and workarounds for UnicodeEncodeError on Python 3
Notes on installing Python3 and using pip on Windows7
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
To you who develop Python under Windows & proxy
[Note] Installing Python 3.6 + α on Windows and RHEL
Install ZIP version Python and pip on Windows 10
How to share folders with Docker and Windows with tensorflow
[Windows] [Python3] Install python3 and Jupyter Notebook (formerly ipython notebook) on Windows
Install and develop Git, VSCode, Docker on Chrome OS
Install Docker on Arch Linux and run it remotely
Installation of Docker on Raspberry Pi and L Chika
Create a decent shell and python environment on Windows
Pylint on Windows Atom
Install docker on Fedora31
goland and Docker settings
Linux (WSL) on Windows
Use pyvenv on Windows
Linux, Windows proxy settings
Anaconda on Windows Terminal
Install Anaconda on Windows 10
python basic on windows ②
Install python on windows
Proxy server with Docker
Install pycuda on Windows10
Build TensorFlow on Windows
Try FEniCS on Windows!
Build XGBoost on Windows
Install pygraphviz on Windows 10
Use Ansible on Windows
Install Docker on AWS
Try Poerty on Windows
Install Chainer 1.5.0 on Windows
Use QuTiP on Windows
Use pip on Windows
Install Python 3.6 on Docker
Until you create Python Virtualenv on Windows and launch Jupyter
Introducing Kaggle's Docker Image on Windows to build an environment
Install Jupiter Notebook on Windows with pip in proxy environment
Install python and Visual Studio Code on windows10 (April 2020 version)
Until the start of the django tutorial with pycharm on Windows
Python environment construction procedure memo using Docker on Windows10 Home