--The proxy is http://proxy.any.ac.jp:8080/
docker
-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.
-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
--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 ...
――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