{
  "id": 22552,
  "title": "Error running script - Keras",
  "url": "/competitions/state-farm-distracted-driver-detection/discussion/22552",
  "author_name": "",
  "post_date": "2016-07-29T06:20:44.760Z",
  "votes": null,
  "comment_count": 7,
  "views": 871,
  "content": "<p>Hi All,</p>\n\n<p>I am getting the following error while running script.</p>\n\n<p>ValueError: Unable to create the compiledir directory '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64'. Check the permissions.</p>\n\n<p>Here is the link to the script which I am trying to run. <a href=\"https://www.kaggle.com/ernest/state-farm-distracted-driver-detection/keras\">https://www.kaggle.com/ernest/state-farm-distracted-driver-detection/keras</a></p>\n\n<p>Can someone please help me with this error?</p>",
  "messages": [
    {
      "id": "129359",
      "postDate": "07/29/2016 06:20:44",
      "content": "<p>Hi All,</p>\n\n<p>I am getting the following error while running script.</p>\n\n<p>ValueError: Unable to create the compiledir directory '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64'. Check the permissions.</p>\n\n<p>Here is the link to the script which I am trying to run. <a href=\"https://www.kaggle.com/ernest/state-farm-distracted-driver-detection/keras\">https://www.kaggle.com/ernest/state-farm-distracted-driver-detection/keras</a></p>\n\n<p>Can someone please help me with this error?</p>",
      "rawMarkdown": "Hi All,\r\n\r\nI am getting the following error while running script.\r\n\r\nValueError: Unable to create the compiledir directory '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64'. Check the permissions.\r\n\r\nHere is the link to the script which I am trying to run. https://www.kaggle.com/ernest/state-farm-distracted-driver-detection/keras\r\n\r\nCan someone please help me with this error?",
      "votes": null
    },
    {
      "id": "129363",
      "postDate": "07/29/2016 07:05:58",
      "content": "<p><strong>Ernest</strong>, set chmod 0777 for directory &quot;/root/.theano/&quot;</p>",
      "rawMarkdown": "**Ernest**, set chmod 0777 for directory \"/root/.theano/\"",
      "votes": null
    },
    {
      "id": "129366",
      "postDate": "07/29/2016 07:41:14",
      "content": "<p>[quote=ZFTurbo;129363]</p>\n\n<p><strong>Ernest</strong>, set chmod 0777 for directory &quot;/root/.theano/&quot;</p>\n\n<p>[/quote]</p>\n\n<p>Hi Turbo, \nThanks for your reply. I added the following line to my code. os.chmod(&quot;/root/.theano/&quot;, stat.S_IRWXU) But I am still getting an error: OSError: [Errno 30] Read-only file system: '/root/.theano/'</p>",
      "rawMarkdown": "[quote=ZFTurbo;129363]\r\n\r\n**Ernest**, set chmod 0777 for directory \"/root/.theano/\"\r\n\r\n[/quote]\r\n\r\nHi Turbo, \r\nThanks for your reply. I added the following line to my code. os.chmod(\"/root/.theano/\", stat.S_IRWXU) But I am still getting an error: OSError: [Errno 30] Read-only file system: '/root/.theano/'",
      "votes": null
    },
    {
      "id": "129368",
      "postDate": "07/29/2016 07:49:51",
      "content": "<p>1) It's better to do directly from Linux console under &quot;root&quot;. Probably you need to create this directory if it doesn't exists: /root/.theano/</p>\n\n<p>2) Second way is to change theano configuration directly from script:</p>\n\n<pre><code>import os\nos.environ[&quot;THEANO_FLAGS&quot;] = &quot;mode=FAST_RUN,device=gpu,floatX=float32&quot;\nimport theano\n</code></pre>\n\n<p>You need to change &quot;base_compiledir&quot; to directory which exists and writable. See details here:\n<a href=\"http://deeplearning.net/software/theano/library/config.html\">http://deeplearning.net/software/theano/library/config.html</a></p>",
      "rawMarkdown": "1) It's better to do directly from Linux console under \"root\". Probably you need to create this directory if it doesn't exists: /root/.theano/\r\n\r\n2) Second way is to change theano configuration directly from script:\r\n\r\n    import os\r\n    os.environ[\"THEANO_FLAGS\"] = \"mode=FAST_RUN,device=gpu,floatX=float32\"\r\n    import theano\r\n\r\nYou need to change \"base_compiledir\" to directory which exists and writable. See details here:\r\nhttp://deeplearning.net/software/theano/library/config.html",
      "votes": null
    },
    {
      "id": "129377",
      "postDate": "07/29/2016 09:30:37",
      "content": "<p>[quote=ZFTurbo;129368]</p>\n\n<p>1) It's better to do directly from Linux console under &quot;root&quot;. Probably you need to create this directory if it doesn't exists: /root/.theano/</p>\n\n<p>2) Second way is to change theano configuration directly from script:</p>\n\n<pre><code>import os\nos.environ[&quot;THEANO_FLAGS&quot;] = &quot;mode=FAST_RUN,device=gpu,floatX=float32&quot;\nimport theano\n</code></pre>\n\n<p>You need to change &quot;base_compiledir&quot; to directory which exists and writable. See details here:\n<a href=\"http://deeplearning.net/software/theano/library/config.html\">http://deeplearning.net/software/theano/library/config.html</a></p>\n\n<p>[/quote]</p>\n\n<p>Hi,ZFTurbo&#12290;I had try your second way,but it don't work ,also \nOSError: [Errno 30] Read-only file system: '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8 </p>",
      "rawMarkdown": "[quote=ZFTurbo;129368]\r\n\r\n1) It's better to do directly from Linux console under \"root\". Probably you need to create this directory if it doesn't exists: /root/.theano/\r\n\r\n2) Second way is to change theano configuration directly from script:\r\n\r\n    import os\r\n    os.environ[\"THEANO_FLAGS\"] = \"mode=FAST_RUN,device=gpu,floatX=float32\"\r\n    import theano\r\n\r\nYou need to change \"base_compiledir\" to directory which exists and writable. See details here:\r\nhttp://deeplearning.net/software/theano/library/config.html\r\n\r\n[/quote]\r\n\r\nHi,ZFTurbo。I had try your second way,but it don't work ,also \r\nOSError: [Errno 30] Read-only file system: '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8",
      "votes": null
    },
    {
      "id": "129378",
      "postDate": "07/29/2016 09:36:00",
      "content": "<p>Try this:</p>\n\n<pre><code>os.environ[&quot;THEANO_FLAGS&quot;] = &quot;base_compiledir=./some_dir_where_you_can_write/&quot;\n</code></pre>",
      "rawMarkdown": "Try this:\r\n\r\n    os.environ[\"THEANO_FLAGS\"] = \"base_compiledir=./some_dir_where_you_can_write/\"",
      "votes": null
    },
    {
      "id": "129379",
      "postDate": "07/29/2016 09:50:18",
      "content": "<p>The .theano dir isn't necessary, you can <code>sudo rm</code> it and it will rebuild on the next run :)</p>",
      "rawMarkdown": "The .theano dir isn't necessary, you can `sudo rm` it and it will rebuild on the next run :)",
      "votes": null
    },
    {
      "id": "129381",
      "postDate": "07/29/2016 10:56:28",
      "content": "<p>I tried this  <code>os.environ[&quot;THEANO_FLAGS&quot;] = &quot;base_compiledir=kaggle/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64/&quot;</code> and it seems to be working :)</p>",
      "rawMarkdown": "I tried this  `os.environ[\"THEANO_FLAGS\"] = \"base_compiledir=kaggle/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64/\"` and it seems to be working :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 129363,
      "author_name": "zfturbo",
      "author_url": "",
      "post_date": "07/29/2016 07:05:58",
      "content": "<p><strong>Ernest</strong>, set chmod 0777 for directory &quot;/root/.theano/&quot;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 129366,
      "author_name": "ernest",
      "author_url": "",
      "post_date": "07/29/2016 07:41:14",
      "content": "<p>[quote=ZFTurbo;129363]</p>\n\n<p><strong>Ernest</strong>, set chmod 0777 for directory &quot;/root/.theano/&quot;</p>\n\n<p>[/quote]</p>\n\n<p>Hi Turbo, \nThanks for your reply. I added the following line to my code. os.chmod(&quot;/root/.theano/&quot;, stat.S_IRWXU) But I am still getting an error: OSError: [Errno 30] Read-only file system: '/root/.theano/'</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 129368,
      "author_name": "zfturbo",
      "author_url": "",
      "post_date": "07/29/2016 07:49:51",
      "content": "<p>1) It's better to do directly from Linux console under &quot;root&quot;. Probably you need to create this directory if it doesn't exists: /root/.theano/</p>\n\n<p>2) Second way is to change theano configuration directly from script:</p>\n\n<pre><code>import os\nos.environ[&quot;THEANO_FLAGS&quot;] = &quot;mode=FAST_RUN,device=gpu,floatX=float32&quot;\nimport theano\n</code></pre>\n\n<p>You need to change &quot;base_compiledir&quot; to directory which exists and writable. See details here:\n<a href=\"http://deeplearning.net/software/theano/library/config.html\">http://deeplearning.net/software/theano/library/config.html</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 129377,
      "author_name": "potterxu",
      "author_url": "",
      "post_date": "07/29/2016 09:30:37",
      "content": "<p>[quote=ZFTurbo;129368]</p>\n\n<p>1) It's better to do directly from Linux console under &quot;root&quot;. Probably you need to create this directory if it doesn't exists: /root/.theano/</p>\n\n<p>2) Second way is to change theano configuration directly from script:</p>\n\n<pre><code>import os\nos.environ[&quot;THEANO_FLAGS&quot;] = &quot;mode=FAST_RUN,device=gpu,floatX=float32&quot;\nimport theano\n</code></pre>\n\n<p>You need to change &quot;base_compiledir&quot; to directory which exists and writable. See details here:\n<a href=\"http://deeplearning.net/software/theano/library/config.html\">http://deeplearning.net/software/theano/library/config.html</a></p>\n\n<p>[/quote]</p>\n\n<p>Hi,ZFTurbo&#12290;I had try your second way,but it don't work ,also \nOSError: [Errno 30] Read-only file system: '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8 </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 129378,
      "author_name": "zfturbo",
      "author_url": "",
      "post_date": "07/29/2016 09:36:00",
      "content": "<p>Try this:</p>\n\n<pre><code>os.environ[&quot;THEANO_FLAGS&quot;] = &quot;base_compiledir=./some_dir_where_you_can_write/&quot;\n</code></pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 129379,
      "author_name": "anokas",
      "author_url": "",
      "post_date": "07/29/2016 09:50:18",
      "content": "<p>The .theano dir isn't necessary, you can <code>sudo rm</code> it and it will rebuild on the next run :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 129381,
      "author_name": "ernest",
      "author_url": "",
      "post_date": "07/29/2016 10:56:28",
      "content": "<p>I tried this  <code>os.environ[&quot;THEANO_FLAGS&quot;] = &quot;base_compiledir=kaggle/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64/&quot;</code> and it seems to be working :)</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "129359": "Hi All,\r\n\r\nI am getting the following error while running script.\r\n\r\nValueError: Unable to create the compiledir directory '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64'. Check the permissions.\r\n\r\nHere is the link to the script which I am trying to run. https://www.kaggle.com/ernest/state-farm-distracted-driver-detection/keras\r\n\r\nCan someone please help me with this error?",
    "129363": "**Ernest**, set chmod 0777 for directory \"/root/.theano/\"",
    "129366": "[quote=ZFTurbo;129363]\r\n\r\n**Ernest**, set chmod 0777 for directory \"/root/.theano/\"\r\n\r\n[/quote]\r\n\r\nHi Turbo, \r\nThanks for your reply. I added the following line to my code. os.chmod(\"/root/.theano/\", stat.S_IRWXU) But I am still getting an error: OSError: [Errno 30] Read-only file system: '/root/.theano/'",
    "129368": "1) It's better to do directly from Linux console under \"root\". Probably you need to create this directory if it doesn't exists: /root/.theano/\r\n\r\n2) Second way is to change theano configuration directly from script:\r\n\r\n    import os\r\n    os.environ[\"THEANO_FLAGS\"] = \"mode=FAST_RUN,device=gpu,floatX=float32\"\r\n    import theano\r\n\r\nYou need to change \"base_compiledir\" to directory which exists and writable. See details here:\r\nhttp://deeplearning.net/software/theano/library/config.html",
    "129377": "[quote=ZFTurbo;129368]\r\n\r\n1) It's better to do directly from Linux console under \"root\". Probably you need to create this directory if it doesn't exists: /root/.theano/\r\n\r\n2) Second way is to change theano configuration directly from script:\r\n\r\n    import os\r\n    os.environ[\"THEANO_FLAGS\"] = \"mode=FAST_RUN,device=gpu,floatX=float32\"\r\n    import theano\r\n\r\nYou need to change \"base_compiledir\" to directory which exists and writable. See details here:\r\nhttp://deeplearning.net/software/theano/library/config.html\r\n\r\n[/quote]\r\n\r\nHi,ZFTurbo。I had try your second way,but it don't work ,also \r\nOSError: [Errno 30] Read-only file system: '/root/.theano/compiledir_Linux-3.19--generic-x86_64-with-debian-8",
    "129378": "Try this:\r\n\r\n    os.environ[\"THEANO_FLAGS\"] = \"base_compiledir=./some_dir_where_you_can_write/\"",
    "129379": "The .theano dir isn't necessary, you can `sudo rm` it and it will rebuild on the next run :)",
    "129381": "I tried this  `os.environ[\"THEANO_FLAGS\"] = \"base_compiledir=kaggle/compiledir_Linux-3.19--generic-x86_64-with-debian-8.5--3.5.2-64/\"` and it seems to be working :)"
  },
  "source": "meta"
}