diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py
index 7e4601e85aa7269fe5b1dbc629f7e07cb8855e32..f71b8f7acdeba3aac8e25a18e986b2009a84242a 100644
--- a/tools/run_tests/artifact_targets.py
+++ b/tools/run_tests/artifact_targets.py
@@ -97,9 +97,13 @@ class PythonArtifact:
       raise Exception('Not supported yet.')
     else:
       if self.platform == 'linux':
+        environ = {}
+        if self.arch == 'x86':
+          environ['SETARCH_CMD'] = 'linux32'
         return create_docker_jobspec(self.name,
             'tools/dockerfile/grpc_artifact_linux_%s' % self.arch,
-            'tools/run_tests/build_artifact_python.sh')
+            'tools/run_tests/build_artifact_python.sh',
+            environ=environ)
       else:
         return create_jobspec(self.name,
                               ['tools/run_tests/build_artifact_python.sh'])
@@ -127,7 +131,7 @@ class RubyArtifact:
       if self.platform == 'linux':
         environ = {}
         if self.arch == 'x86':
-          environ['SETARCH_CMD'] = 'i386'
+          environ['SETARCH_CMD'] = 'linux32'
         return create_docker_jobspec(self.name,
             'tools/dockerfile/grpc_artifact_linux_%s' % self.arch,
             'tools/run_tests/build_artifact_ruby.sh',
diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh
index 0ff6b2f8c050f1f3b3c07de062005e83d100d6a5..0b263db8c0df4bcfdc36ee9ef51f1b3194fe5550 100755
--- a/tools/run_tests/build_artifact_python.sh
+++ b/tools/run_tests/build_artifact_python.sh
@@ -37,7 +37,7 @@ pip install --upgrade setuptools
 
 pip install -rrequirements.txt
 
-GRPC_PYTHON_BUILD_WITH_CYTHON=1 python setup.py \
+GRPC_PYTHON_BUILD_WITH_CYTHON=1 ${SETARCH_CMD} python setup.py \
     bdist_wheel \
     sdist \
     bdist_egg_grpc_custom
diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh
index 8f722ee420df9e31810bb14dec65fec5aa6a23d2..482d128be3b1340b693207668d765656487b4fe2 100755
--- a/tools/run_tests/build_artifact_ruby.sh
+++ b/tools/run_tests/build_artifact_ruby.sh
@@ -32,7 +32,7 @@ set -ex
 
 cd $(dirname $0)/../..
 
-bundle install
+${SETARCH_CMD} bundle install
 
 ${SETARCH_CMD} rake native gem