This is the error:
OSError                                   Traceback (most recent call last)
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/sagemaker/utils.py in repack_model(inference_script, source_directory, dependencies, model_uri, repacked_model_uri, sagemaker_session, kms_key)
419         with tarfile.open(tmp_model_path, mode=“w:gz”) as t:
 → 420             t.add(model_dir, arcname=os.path.sep)
421
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/tarfile.py in add(self, name, arcname, recursive, exclude, filter)
1960                     self.add(os.path.join(name, f), os.path.join(arcname, f),
 → 1961                             recursive, exclude, filter=filter)
1962
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/tarfile.py in add(self, name, arcname, recursive, exclude, filter)
1960                     self.add(os.path.join(name, f), os.path.join(arcname, f),
 → 1961                             recursive, exclude, filter=filter)
1962
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/tarfile.py in add(self, name, arcname, recursive, exclude, filter)
1953             with bltn_open(name, “rb”) as f:
 → 1954                 self.addfile(tarinfo, f)
1955
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/tarfile.py in addfile(self, tarinfo, fileobj)
1981         if fileobj is not None:
 → 1982             copyfileobj(fileobj, self.fileobj, tarinfo.size, bufsize=bufsize)
1983             blocks, remainder = divmod(tarinfo.size, BLOCKSIZE)
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/tarfile.py in copyfileobj(src, dst, length, exception, bufsize)
251             raise exception(“unexpected end of data”)
 → 252         dst.write(buf)
253
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/gzip.py in write(self, data)
263         if length > 0:
 → 264             self.fileobj.write(self.compress.compress(data))
265             self.size += length
OSError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
OSError                                   Traceback (most recent call last)
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/gzip.py in close(self)
308             if self.mode == WRITE:
 → 309                 fileobj.write(self.compress.flush())
310                 write32u(fileobj, self.crc)
OSError: [Errno 28] No space left on device
During handling of the above exception, another exception occurred:
OSError                                   Traceback (most recent call last)
 in 
5 predictor = model_for_deployment.deploy(initial_instance_count=1,
6                                         instance_type=“ml.g4dn.2xlarge”,
----> 7                                         endpoint_name=endpoint_name
8                                         )
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/sagemaker/model.py in deploy(self, initial_instance_count, instance_type, serializer, deserializer, accelerator_type, endpoint_name, tags, kms_key, wait, data_capture_config, **kwargs)
709                 self._base_name = “-”.join((self._base_name, compiled_model_suffix))
710
 → 711         self._create_sagemaker_model(instance_type, accelerator_type, tags)
712         production_variant = sagemaker.production_variant(
713             self.name, instance_type, initial_instance_count, accelerator_type=accelerator_type
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/sagemaker/model.py in _create_sagemaker_model(self, instance_type, accelerator_type, tags)
263                 /api/latest/reference/services/sagemaker.html#SageMaker.Client.add_tags
264         “”"
 → 265         container_def = self.prepare_container_def(instance_type, accelerator_type=accelerator_type)
266
267         self._ensure_base_name_if_needed(container_def[“Image”])
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/sagemaker/huggingface/model.py in prepare_container_def(self, instance_type, accelerator_type)
269
270         deploy_key_prefix = model_code_key_prefix(self.key_prefix, self.name, deploy_image)
 → 271         self._upload_code(deploy_key_prefix, repack=True)
272         deploy_env = dict(self.env)
273         deploy_env.update(self._framework_env_vars())
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/sagemaker/model.py in _upload_code(self, key_prefix, repack)
1088                 repacked_model_uri=repacked_model_data,
1089                 sagemaker_session=self.sagemaker_session,
 → 1090                 kms_key=self.model_kms_key,
1091             )
1092
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/site-packages/sagemaker/utils.py in repack_model(inference_script, source_directory, dependencies, model_uri, repacked_model_uri, sagemaker_session, kms_key)
418         tmp_model_path = os.path.join(tmp, “temp-model.tar.gz”)
419         with tarfile.open(tmp_model_path, mode=“w:gz”) as t:
 → 420             t.add(model_dir, arcname=os.path.sep)
421
422         _save_model(repacked_model_uri, tmp_model_path, sagemaker_session, kms_key=kms_key)
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/tarfile.py in exit(self, type, value, traceback)
2439             # it would try to write end-of-archive blocks and padding.
2440             if not self._extfileobj:
 → 2441                 self.fileobj.close()
2442             self.closed = True
2443
~/anaconda3/envs/pytorch_latest_p36/lib/python3.6/gzip.py in close(self)
317             if myfileobj:
318                 self.myfileobj = None
 → 319                 myfileobj.close()
320
321     def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH):
OSError: [Errno 28] No space left on device