-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I experienced some issues on a first time install on a Windows machine using v.1.15.1. A summary of what I did to resolve these issues is shown below as are the full steps to reproduce.
The basic issue was that the build did not work in my environment. The modifications summarized below fixed the issues. These changes are checked in to github here: https://github.com/greshje/anonlink-entity-service/tree/greshje-2021-11-20
I was able to resolve the issues I was seeing by doing the following:
- Uncomment the following line in build.sh then run .\tools\build.sh
#docker build -t data61/anonlink-base:latest base - Make the following changes to /base/Docker
python3=3.9.5-r2 \
python3-dev=3.9.5-r2 \
libpq=13.5-r0 \
postgresql-dev=13.5-r0 \
Full steps to reproduce are shown below. Please let me know if there is any further information I can provide (or if there's something here that I'm overlooking).
Thanks,
John
Full Steps to Reproduce:
Steps to reproduce
Set up Environment
This is run on Windows
Python version is 3.9.7
Docker Desktop version is 4-0-1 (from Docker Desktop 4-0-1 Installer.exe)
Start with a clean install of Python
Run Uninstall Python
Delete the following file:
C:\Program Files\Python39
C:\Users<username>\Roaming\Python
Install Python using “python-3.9.7-amd64.exe”
Select custom installation and select “Install for all users” on the Advanced Options so Python is installed at C:\Program Files\Python39
Start with a clean install of Docker Desktop
Existing Docker Desktop installs are removed by running Uninstall and removing the following directories:
C:\Program Files\Docker
C:\ProgramData\DockerDesktop
C:\Users<username>\AppData\Local\Docker
C:\Users<username>\AppData\Roaming\Docker
C:\Users<username>\AppData\Local\Docker Desktop
C:\Users<username>.docker
Docker Desktop is installed using “Docker Desktop 4-0-1 Installer.exe”
Start the Docker Desktop Application
Clone and Checkout anonlink-entity-service
https://github.com/data61/anonlink-entity-service was forked to
https://github.com/greshje/anonlink-entity-service
The branch greshe-2021-11-20 was created from v.1.15.1
The issue can be reproduced by checking out the original v.1.15.1 branch using:
@echo off
echo.
echo.
echo Cloning anonlink-entity-service
::
:: TURN OFF AUTOCRLF
::
git config --global core.autocrlf false
echo autocrlf:
git config core.autocrlf
::
:: CLONE
::
echo Doing git clone
git clone https://github.com/greshje/anonlink-entity-service
cd anonlink-entity-service
git checkout v.1.15.1
::
:: RESET AUTOCRLF AND ECHO STATUS
::
git config --global core.autocrlf true
echo autocrlf:
git config core.autocrlf
cd..
Run:
.\tools\build.sh
Run the following (this is in the script /win/start-anonlink-entity-service.bat):
docker-compose -f ../tools/docker-compose.yml up --remove-orphans
ERROR 1 (sqlalchemy) -- NOTE THE FOLLOWING ERROR:
ModuleNotFoundError: No module named 'sqlalchemy'
(full output is in 01-error-sqlalchemy-1.txt)
First attempt to fix error:
From cmd prompt
cd to /base
pip install -r requirements.txt
Run:
docker-compose -f ../tools/docker-compose.yml up --remove-orphans
ERROR 2 (sqlalchemy again) -- NOTE THE FOLLOWING ERROR:
ModuleNotFoundError: No module named 'sqlalchemy'
(full output is in 02-error-sqlalchemy-2.txt)
Second attempt to fix error:
Uncomment the following line in build.sh then run
.\tools\build.sh
#docker build -t data61/anonlink-base:latest base
Note that the build exits very quickly
Run:
docker-compose -f ../tools/docker-compose.yml up --remove-orphans
ERROR 3 (sqlalchemy again) -- NOTE THE FOLLOWING ERROR:
ModuleNotFoundError: No module named 'sqlalchemy'
(full output is in 03-error-sqlalchemy-3.txt)
Third attempt to fix error:
Run the following from the cmd line (from proj root dir):
docker build -t data61/anonlink-base:latest base
ERROR 4 (build error)
Note the following error (full output is in 04-error-build.txt)
#9 1.210 ERROR: unable to select packages:
#9 1.215 libpq-13.5-r0:
#9 1.215 breaks: world[libpq=13.4-r0]
#9 1.215 python3-3.9.5-r2:
#9 1.215 breaks: world[python3=3.9.5-r1]
Make the following changes to /base/Docker
python3=3.9.5-r2
python3-dev=3.9.5-r2 \
libpq=13.5-r0 \
postgresql-dev=13.5-r0 \
Run:
.\tools\build.sh
(note the build takes much longer)
Run:
/win/start-anonlink-entity-service.bat
Confirm Solution
Solution can be confirmed by
- re-cleaning the environment (Uninstall Python, Docker, other associated files as described above
- clone and checkout the updated version
@echo off
echo.
echo.
echo Cloning anonlink-entity-service
::
:: TURN OFF AUTOCRLF
::
git config --global core.autocrlf false
echo autocrlf:
git config core.autocrlf
::
:: CLONE
::
echo Doing git clone
git clone https://github.com/greshje/anonlink-entity-service
cd anonlink-entity-service
git checkout greshje-2021-11-20
::
:: RESET AUTOCRLF AND ECHO STATUS
::
git config --global core.autocrlf true
echo autocrlf:
git config core.autocrlf
cd..
Run .\tools\build.sh
Run /win/start-anonlink-entity-service.bat (from that directory)
(output is in 05-success.txt)
Output files
01-error-sqlalchemy-1.txt
02-error-sqlalchemy-2.txt
03-error-sqlalchemy-3.txt
04-error-build.txt
05-success.txt