{
  "id": 237105,
  "title": "Can we first install smp then disable the Internet?",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/237105",
  "author_name": "",
  "post_date": "2021-05-07T06:46:50.463611200Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>For submission I need to install package \"segmentation_models_pytorch\", which is not provided when a new notebook initialized.</p>\n<p>My question is, can we use \"pip install\" with Internet enabled to install packages first, then disable the Internet connection to make a submission? Inseated of install locally from uploaded datasets.</p>\n<p>Thanks!</p>",
  "messages": [
    {
      "id": "1296294",
      "postDate": "05/07/2021 06:46:50",
      "content": "<p>For submission I need to install package \"segmentation_models_pytorch\", which is not provided when a new notebook initialized.</p>\n<p>My question is, can we use \"pip install\" with Internet enabled to install packages first, then disable the Internet connection to make a submission? Inseated of install locally from uploaded datasets.</p>\n<p>Thanks!</p>",
      "rawMarkdown": "For submission I need to install package \"segmentation_models_pytorch\", which is not provided when a new notebook initialized.\n\nMy question is, can we use \"pip install\" with Internet enabled to install packages first, then disable the Internet connection to make a submission? Inseated of install locally from uploaded datasets.\n\nThanks!",
      "votes": null
    },
    {
      "id": "1296299",
      "postDate": "05/07/2021 06:51:32",
      "content": "<p>Afraid not, no. Because the submission will use a new VM without the package installed and with internet disabled.</p>",
      "rawMarkdown": "Afraid not, no. Because the submission will use a new VM without the package installed and with internet disabled.",
      "votes": null
    },
    {
      "id": "1296302",
      "postDate": "05/07/2021 07:01:25",
      "content": "<p>I see. Thanks a lot for your quick reply!</p>",
      "rawMarkdown": "I see. Thanks a lot for your quick reply!",
      "votes": null
    },
    {
      "id": "1296315",
      "postDate": "05/07/2021 07:19:28",
      "content": "<p>what you can do without internet is use Add Data, then add a dataset or output notebook for what you need - e.g. <br>\n<a href=\"https://www.kaggle.com/matjes/segmentation-models-pytorch-install\" target=\"_blank\">https://www.kaggle.com/matjes/segmentation-models-pytorch-install</a><br>\nor search datasets for what you need or create your own from a github repo, etc. then Add Data your dataset and  then do pip install.  But can have issues with dependencies so you would need to get all of those as well. Below should work but if not reply back. </p>\n<p><code>package_paths = [</code><br>\n<code>\"../input/segmentation-models-pytorch-install\",</code><br>\n<code>]</code><br>\n<code>import sys;</code></p>\n<p><code>for pth in package_paths:</code></p>\n<pre><code>    `    sys.path.append(pth)`\n</code></pre>\n<p>'import segmentation_models_pytorch as smp'</p>",
      "rawMarkdown": "what you can do without internet is use Add Data, then add a dataset or output notebook for what you need - e.g. \nhttps://www.kaggle.com/matjes/segmentation-models-pytorch-install\nor search datasets for what you need or create your own from a github repo, etc. then Add Data your dataset and  then do pip install.  But can have issues with dependencies so you would need to get all of those as well. Below should work but if not reply back. \n\n\n`package_paths = [`\n`\"../input/segmentation-models-pytorch-install\",`\n`]`\n`import sys; `\n\n`for pth in package_paths:`\n  \n        `    sys.path.append(pth)`\n\n'import segmentation_models_pytorch as smp'",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1296299,
      "author_name": "jamesphoward",
      "author_url": "",
      "post_date": "05/07/2021 06:51:32",
      "content": "<p>Afraid not, no. Because the submission will use a new VM without the package installed and with internet disabled.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1296302,
          "author_name": "lijiaqi96",
          "author_url": "",
          "post_date": "05/07/2021 07:01:25",
          "content": "<p>I see. Thanks a lot for your quick reply!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1296315,
      "author_name": "something4kag",
      "author_url": "",
      "post_date": "05/07/2021 07:19:28",
      "content": "<p>what you can do without internet is use Add Data, then add a dataset or output notebook for what you need - e.g. <br>\n<a href=\"https://www.kaggle.com/matjes/segmentation-models-pytorch-install\" target=\"_blank\">https://www.kaggle.com/matjes/segmentation-models-pytorch-install</a><br>\nor search datasets for what you need or create your own from a github repo, etc. then Add Data your dataset and  then do pip install.  But can have issues with dependencies so you would need to get all of those as well. Below should work but if not reply back. </p>\n<p><code>package_paths = [</code><br>\n<code>\"../input/segmentation-models-pytorch-install\",</code><br>\n<code>]</code><br>\n<code>import sys;</code></p>\n<p><code>for pth in package_paths:</code></p>\n<pre><code>    `    sys.path.append(pth)`\n</code></pre>\n<p>'import segmentation_models_pytorch as smp'</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1296294": "For submission I need to install package \"segmentation_models_pytorch\", which is not provided when a new notebook initialized.\n\nMy question is, can we use \"pip install\" with Internet enabled to install packages first, then disable the Internet connection to make a submission? Inseated of install locally from uploaded datasets.\n\nThanks!",
    "1296299": "Afraid not, no. Because the submission will use a new VM without the package installed and with internet disabled.",
    "1296302": "I see. Thanks a lot for your quick reply!",
    "1296315": "what you can do without internet is use Add Data, then add a dataset or output notebook for what you need - e.g. \nhttps://www.kaggle.com/matjes/segmentation-models-pytorch-install\nor search datasets for what you need or create your own from a github repo, etc. then Add Data your dataset and  then do pip install.  But can have issues with dependencies so you would need to get all of those as well. Below should work but if not reply back. \n\n\n`package_paths = [`\n`\"../input/segmentation-models-pytorch-install\",`\n`]`\n`import sys; `\n\n`for pth in package_paths:`\n  \n        `    sys.path.append(pth)`\n\n'import segmentation_models_pytorch as smp'"
  },
  "source": "meta"
}