pitrou commented on code in PR #14501:
URL: https://github.com/apache/arrow/pull/14501#discussion_r1005512712


##########
dev/archery/archery/docker/core.py:
##########
@@ -342,7 +342,8 @@ def run(self, service_name, command=None, *, env=None, 
volumes=None,
 
             # append env variables from the compose conf
             for k, v in service.get('environment', {}).items():
-                args.extend(['-e', '{}={}'.format(k, v)])
+                if v is not None:
+                    args.extend(['-e', '{}={}'.format(k, v)])

Review Comment:
   I tested again locally and it works (using 
`SETUPTOOLS_SCM_PRETEND_VERSION=1.2.3 archery --debug  docker  run 
ubuntu-cuda-python bash`). Do you get a different result?
   ```console
   $ SETUPTOOLS_SCM_PRETEND_VERSION=1.2.3 archery --debug  docker  run 
ubuntu-cuda-python bash
   DEBUG:archery:Executing `['git', '-C', '/home/antoine/arrow/dev/cpp', 
'rev-parse', '--show-toplevel']`
   DEBUG:archery:Executing `['docker-compose', '--file', 
'/home/antoine/arrow/dev/docker-compose.yml', 'config']`
   DEBUG:archery:Executing `['docker-compose', '--file', 
'/home/antoine/arrow/dev/docker-compose.yml', 'pull', '--ignore-pull-failures', 
'ubuntu-cuda-cpp']`
   Pulling ubuntu-cuda-cpp ... done
   DEBUG:archery:Executing `['docker-compose', '--file', 
'/home/antoine/arrow/dev/docker-compose.yml', 'pull', '--ignore-pull-failures', 
'ubuntu-cuda-python']`
   Pulling ubuntu-cuda-python ... done
   DEBUG:archery:Executing `['docker-compose', '--file', 
'/home/antoine/arrow/dev/docker-compose.yml', 'build', '--build-arg', 
'BUILDKIT_INLINE_CACHE=1', 'ubuntu-cuda-cpp']`
   ...
   DEBUG:archery:Executing `['docker-compose', '--file', 
'/home/antoine/arrow/dev/docker-compose.yml', 'build', '--build-arg', 
'BUILDKIT_INLINE_CACHE=1', 'ubuntu-cuda-python']`
   ...
   DEBUG:archery:Executing `['docker', 'run', '--rm', '--gpus', 'all', 
'--shm-size', '2G', '-e', 'ARROW_BUILD_UTILITIES=OFF', '-e', 
'ARROW_COMPUTE=ON', '-e', 'ARROW_CSV=ON', '-e', 'ARROW_CUDA=ON', '-e', 
'ARROW_DATASET=ON', '-e', 'ARROW_ENABLE_TIMING_TESTS=OFF', '-e', 
'ARROW_FILESYSTEM=ON', '-e', 'ARROW_GANDIVA=OFF', '-e', 'ARROW_GCS=OFF', '-e', 
'ARROW_HDFS=ON', '-e', 'ARROW_JEMALLOC=ON', '-e', 'ARROW_JSON=ON', '-e', 
'ARROW_ORC=OFF', '-e', 'ARROW_PARQUET=ON', '-e', 'ARROW_PLASMA=OFF', '-e', 
'ARROW_S3=OFF', '-e', 'ARROW_SUBSTRAIT=OFF', '-e', 
'ARROW_WITH_OPENTELEMETRY=OFF', '-e', 'CCACHE_COMPILERCHECK=content', '-e', 
'CCACHE_COMPRESS=1', '-e', 'CCACHE_COMPRESSLEVEL=6', '-e', 
'CCACHE_DIR=/ccache', '-e', 'CCACHE_MAXSIZE=1G', '-e', 
'SCCACHE_S3_KEY_PREFIX=sccache', '-e', 'SETUPTOOLS_SCM_PRETEND_VERSION=1.2.3', 
'-v', '/home/antoine/arrow/dev:/arrow:delegated', '-v', 
'ubuntu-ccache:/ccache:delegated', '-it', 
'apache/arrow-dev:amd64-ubuntu-20.04-cuda-11.0.3-python-3', 'bash']`
   root@6e458d15abf9:/# echo $SETUPTOOLS_SCM_PRETEND_VERSION 
   1.2.3
   
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to