Skip to content

Commit

Permalink
Merge pull request #490 from philipkozeny/nproc
Browse files Browse the repository at this point in the history
  • Loading branch information
philipkozeny authored Oct 16, 2023
2 parents 746eb95 + e9e9dad commit 0cb7f14
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions 4.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ COPY --from=build / /

# Please override this
ENV NOMINATIM_PASSWORD=qaIACxO6wMR3
# how many threads should be use for importing
ENV THREADS=16

ENV PROJECT_DIR=/nominatim

Expand Down
2 changes: 1 addition & 1 deletion 4.2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following environment variables are available for configuration:
- `IMPORT_US_POSTCODES`: Whether to download and import the US postcode dump (`true`) or path to US postcode dump in the container. (default: `false`)
- `IMPORT_GB_POSTCODES`: Whether to download and import the GB postcode dump (`true`) or path to GB postcode dump in the container. (default: `false`)
- `IMPORT_TIGER_ADDRESSES`: Whether to download and import the Tiger address data (`true`) or path to a preprocessed Tiger address set in the container. (default: `false`)
- `THREADS`: How many threads should be used to import (default: `16`)
- `THREADS`: How many threads should be used to import (default: number of processing units available to the current process via `nproc`)
- `NOMINATIM_PASSWORD`: The password to connect to the database with (default: `qaIACxO6wMR3`)

The following run parameters are available for configuration:
Expand Down
1 change: 0 additions & 1 deletion 4.2/contrib/docker-compose-planet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ services:
nominatim:
container_name: nominatim
image: mediagis/nominatim:4.2
restart: always
ports:
- "8080:8080" # Do not change the second port, only the first before the colon
environment:
Expand Down
5 changes: 5 additions & 0 deletions 4.2/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ CURL=("curl" "-L" "-A" "${USER_AGENT}" "--fail-with-body")

SCP='sshpass -p DMg5bmLPY7npHL2Q scp -o StrictHostKeyChecking=no [email protected]'

# Check if THREADS is not set or is empty
if [ -z "$THREADS" ]; then
THREADS=$(nproc)
fi

if [ "$IMPORT_WIKIPEDIA" = "true" ]; then
echo "Downloading Wikipedia importance dump"
${SCP}:wikimedia-importance.sql.gz ${PROJECT_DIR}/wikimedia-importance.sql.gz
Expand Down
2 changes: 0 additions & 2 deletions 4.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ COPY --from=build / /

# Please override this
ENV NOMINATIM_PASSWORD=qaIACxO6wMR3
# how many threads should be use for importing
ENV THREADS=16

ENV PROJECT_DIR=/nominatim

Expand Down
2 changes: 1 addition & 1 deletion 4.3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following environment variables are available for configuration:
- `IMPORT_US_POSTCODES`: Whether to download and import the US postcode dump (`true`) or path to US postcode dump in the container. (default: `false`)
- `IMPORT_GB_POSTCODES`: Whether to download and import the GB postcode dump (`true`) or path to GB postcode dump in the container. (default: `false`)
- `IMPORT_TIGER_ADDRESSES`: Whether to download and import the Tiger address data (`true`) or path to a preprocessed Tiger address set in the container. (default: `false`)
- `THREADS`: How many threads should be used to import (default: `16`)
- `THREADS`: How many threads should be used to import (default: number of processing units available to the current process via `nproc`)
- `NOMINATIM_PASSWORD`: The password to connect to the database with (default: `qaIACxO6wMR3`)

The following run parameters are available for configuration:
Expand Down
5 changes: 5 additions & 0 deletions 4.3/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ CURL=("curl" "-L" "-A" "${USER_AGENT}" "--fail-with-body")

SCP='sshpass -p DMg5bmLPY7npHL2Q scp -o StrictHostKeyChecking=no [email protected]'

# Check if THREADS is not set or is empty
if [ -z "$THREADS" ]; then
THREADS=$(nproc)
fi

if [ "$IMPORT_WIKIPEDIA" = "true" ]; then
echo "Downloading Wikipedia importance dump"
${SCP}:wikimedia-importance.sql.gz ${PROJECT_DIR}/wikimedia-importance.sql.gz
Expand Down

0 comments on commit 0cb7f14

Please sign in to comment.