Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cenh-halfspace committed Jan 2, 2025
1 parent 71cfaf9 commit 40e4834
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/docker-compose-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ services:
# Forwards the local Docker socket to the container.
- /var/run/docker.sock:/var/run/docker-host.sock
# Update this to wherever you want VS Code to mount the folder of your project
- ..:/workspaces/geh-settlement-report:cached
- ..:${HOME}/work/geh-settlement-report:cached
# Map to Azure CLI token cache location (on Windows)
- "${USERPROFILE}/.azure:/home/joyvan/.azure"
- "${USERPROFILE}/.azure:/home/jovyan/.azure"
working_dir: ${HOME}/work/geh-settlement-report
environment:
# Pass the environment variables from your shell straight through to your containers.
# No warning is issued if the variable in the shell environment is not set.
Expand Down
5 changes: 3 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ services:
# Forwards the local Docker socket to the container.
- /var/run/docker.sock:/var/run/docker-host.sock
# Update this to wherever you want VS Code to mount the folder of your project
- ..:/workspaces/geh-settlement-report:cached
- ..:${HOME}/work/geh-settlement-report:cached
# Map to Azure CLI token cache location (on Linux)
- "${HOME}/.azure:/home/joyvan/.azure"
- "${HOME}/.azure:/home/jovyan/.azure"
working_dir: ${HOME}/work/geh-settlement-report
environment:
# Pass the environment variables from your shell straight through to your containers.
# No warning is issued if the variable in the shell environment is not set.
Expand Down
8 changes: 5 additions & 3 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ ENV PATH=$SPARK_HOME/bin:$HADOOP_HOME/bin:$PATH \
# Dynamically downloading spark dependencies from conf/spark-defaults.conf. This is done to save time in the build pipeline so that we don't need to download on every build.
RUN spark-shell

# Make $HOME owned by the root, which is the user used in the container
# This is needed for e.g. commands that create files or folders in $HOME
RUN sudo chown -R root:users $HOME
# Change the username from jovyan to nayvoj and update the user id to 1001, as that is the user id used in the GitHub Actions runner
RUN usermod -l nayvoj jovyan && \
usermod -u 1001 nayvoj && \
usermod -l jovyan nayvoj
RUN usermod -u 1001 jovyan
2 changes: 1 addition & 1 deletion .docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "Tests folder path: '$1'"
echo "Filter (paths): '$2'"

# Configure Azure CLI to use token cache which must be mapped as volume from host machine
export AZURE_CONFIG_DIR=/home/joyvan/.azure
export AZURE_CONFIG_DIR=/home/jovyan/.azure

# There env vars are important to ensure that the driver and worker nodes in spark are alligned
export PYSPARK_PYTHON=/opt/conda/bin/python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-databricks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ jobs:
entry_points/
infrastructure/"
IMAGE_TAG=${{ inputs.image_tag }} docker compose -f .devcontainer/docker-compose.yml run --rm -u root -w //workspaces/${repository_name} python-unit-test ./.devcontainer/check_test_count.sh $filter
IMAGE_TAG=${{ inputs.image_tag }} docker compose -f .devcontainer/docker-compose.yml run --rm -u root python-unit-test ./.devcontainer/check_test_count.sh $filter

0 comments on commit 40e4834

Please sign in to comment.