Pytorch PermissionError: [Errno 13] Permission denied: '/.torch'How do I use sudo to redirect output to a location I don't have permission to write to?How do I change permissions for a folder and all of its subfolders and files in one step in Linux?ssh “permissions are too open” errorNo module named 'torch' or 'torch.C'Calling pytorch 0.4 from MatlabPytorch saving model UserWarning: Couldn't retrieve source code for container of type NetworkMemoryError when attempting to create a docker image with Torch/PyTorchPyTorch why does the forward function run multiple times and can I change the input shape?Pytorch torchvision MNIST downloadPyinstaller PermissionError: [Errno 13] difference between venv and regular in PyCharm?
The use of multiple foreign keys on same column in SQL Server
How to add power-LED to my small amplifier?
How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?
Pronouncing Dictionary.com's W.O.D "vade mecum" in English
Download, install and reboot computer at night if needed
Patience, young "Padovan"
How long does it take to type this?
Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).
How do I create uniquely male characters?
If Manufacturer spice model and Datasheet give different values which should I use?
Is it possible to make sharp wind that can cut stuff from afar?
I probably found a bug with the sudo apt install function
Simple device (fancy) pointer implementation
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Why don't electromagnetic waves interact with each other?
What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?
Is the month field really deprecated?
When blogging recipes, how can I support both readers who want the narrative/journey and ones who want the printer-friendly recipe?
Do any Labour MPs support no-deal?
"which" command doesn't work / path of Safari?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Why is an old chain unsafe?
Why can't I see bouncing of a switch on an oscilloscope?
How to get the available space of $HOME as a variable in shell scripting?
Pytorch PermissionError: [Errno 13] Permission denied: '/.torch'
How do I use sudo to redirect output to a location I don't have permission to write to?How do I change permissions for a folder and all of its subfolders and files in one step in Linux?ssh “permissions are too open” errorNo module named 'torch' or 'torch.C'Calling pytorch 0.4 from MatlabPytorch saving model UserWarning: Couldn't retrieve source code for container of type NetworkMemoryError when attempting to create a docker image with Torch/PyTorchPyTorch why does the forward function run multiple times and can I change the input shape?Pytorch torchvision MNIST downloadPyinstaller PermissionError: [Errno 13] difference between venv and regular in PyCharm?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm running a pytorch based ML program for image classification using Resnet50 model for transfer learning. I am getting below error regarding permission.
Traceback (most recent call last):
File "imgc_pytorch.py", line 67, in model =
models.resnet50(pretrained=True) File
"/opt/conda/lib/python3.6/site-packages/torchvision/models/resnet.py",
line 187, in resnet50
model.load_state_dict(model_zoo.load_url(model_urls['resnet50'])) File
"/opt/conda/lib/python3.6/site-packages/torch/utils/model_zoo.py",
line 59, in load_url os.makedirs(model_dir) File
"/opt/conda/lib/python3.6/os.py", line 210, in makedirs makedirs(head,
mode, exist_ok) File "/opt/conda/lib/python3.6/os.py", line 220, in
makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission
denied: '/.torch'
Looked up on this forum and it was suggested to add 'sudo'
before the file name, but getting error "/bin/sh: 1: sudo: not found"
permissions pytorch
add a comment |
I'm running a pytorch based ML program for image classification using Resnet50 model for transfer learning. I am getting below error regarding permission.
Traceback (most recent call last):
File "imgc_pytorch.py", line 67, in model =
models.resnet50(pretrained=True) File
"/opt/conda/lib/python3.6/site-packages/torchvision/models/resnet.py",
line 187, in resnet50
model.load_state_dict(model_zoo.load_url(model_urls['resnet50'])) File
"/opt/conda/lib/python3.6/site-packages/torch/utils/model_zoo.py",
line 59, in load_url os.makedirs(model_dir) File
"/opt/conda/lib/python3.6/os.py", line 210, in makedirs makedirs(head,
mode, exist_ok) File "/opt/conda/lib/python3.6/os.py", line 220, in
makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission
denied: '/.torch'
Looked up on this forum and it was suggested to add 'sudo'
before the file name, but getting error "/bin/sh: 1: sudo: not found"
permissions pytorch
I am deploying this code on a GPU cluster provided by my company
– sigmoid
Mar 9 at 3:46
add a comment |
I'm running a pytorch based ML program for image classification using Resnet50 model for transfer learning. I am getting below error regarding permission.
Traceback (most recent call last):
File "imgc_pytorch.py", line 67, in model =
models.resnet50(pretrained=True) File
"/opt/conda/lib/python3.6/site-packages/torchvision/models/resnet.py",
line 187, in resnet50
model.load_state_dict(model_zoo.load_url(model_urls['resnet50'])) File
"/opt/conda/lib/python3.6/site-packages/torch/utils/model_zoo.py",
line 59, in load_url os.makedirs(model_dir) File
"/opt/conda/lib/python3.6/os.py", line 210, in makedirs makedirs(head,
mode, exist_ok) File "/opt/conda/lib/python3.6/os.py", line 220, in
makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission
denied: '/.torch'
Looked up on this forum and it was suggested to add 'sudo'
before the file name, but getting error "/bin/sh: 1: sudo: not found"
permissions pytorch
I'm running a pytorch based ML program for image classification using Resnet50 model for transfer learning. I am getting below error regarding permission.
Traceback (most recent call last):
File "imgc_pytorch.py", line 67, in model =
models.resnet50(pretrained=True) File
"/opt/conda/lib/python3.6/site-packages/torchvision/models/resnet.py",
line 187, in resnet50
model.load_state_dict(model_zoo.load_url(model_urls['resnet50'])) File
"/opt/conda/lib/python3.6/site-packages/torch/utils/model_zoo.py",
line 59, in load_url os.makedirs(model_dir) File
"/opt/conda/lib/python3.6/os.py", line 210, in makedirs makedirs(head,
mode, exist_ok) File "/opt/conda/lib/python3.6/os.py", line 220, in
makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission
denied: '/.torch'
Looked up on this forum and it was suggested to add 'sudo'
before the file name, but getting error "/bin/sh: 1: sudo: not found"
permissions pytorch
permissions pytorch
edited Mar 9 at 10:35
kHarshit
81211017
81211017
asked Mar 9 at 3:38
sigmoidsigmoid
135
135
I am deploying this code on a GPU cluster provided by my company
– sigmoid
Mar 9 at 3:46
add a comment |
I am deploying this code on a GPU cluster provided by my company
– sigmoid
Mar 9 at 3:46
I am deploying this code on a GPU cluster provided by my company
– sigmoid
Mar 9 at 3:46
I am deploying this code on a GPU cluster provided by my company
– sigmoid
Mar 9 at 3:46
add a comment |
1 Answer
1
active
oldest
votes
you can change model_zoo.load_url(model_urls['resnet50'])
to model_zoo.load_url(model_urls['resnet50'], model_dir='~/.torch/')
like this
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
1
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
1
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now
– sigmoid
Mar 11 at 9:15
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073757%2fpytorch-permissionerror-errno-13-permission-denied-torch%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you can change model_zoo.load_url(model_urls['resnet50'])
to model_zoo.load_url(model_urls['resnet50'], model_dir='~/.torch/')
like this
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
1
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
1
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now
– sigmoid
Mar 11 at 9:15
|
show 3 more comments
you can change model_zoo.load_url(model_urls['resnet50'])
to model_zoo.load_url(model_urls['resnet50'], model_dir='~/.torch/')
like this
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
1
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
1
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now
– sigmoid
Mar 11 at 9:15
|
show 3 more comments
you can change model_zoo.load_url(model_urls['resnet50'])
to model_zoo.load_url(model_urls['resnet50'], model_dir='~/.torch/')
like this
you can change model_zoo.load_url(model_urls['resnet50'])
to model_zoo.load_url(model_urls['resnet50'], model_dir='~/.torch/')
like this
answered Mar 9 at 5:03
SepariusSeparius
379313
379313
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
1
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
1
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now
– sigmoid
Mar 11 at 9:15
|
show 3 more comments
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
1
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
1
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now
– sigmoid
Mar 11 at 9:15
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
Since this is on the cluster, looks like the admin will have to do this right ?
– sigmoid
Mar 9 at 7:01
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
@sigmoid I guess not. I mean you still have a user there right? So it should be fine for you to download the pertained model in your home directory
– Separius
Mar 9 at 14:43
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
but the code and date is in a container....on the cluster
– sigmoid
Mar 9 at 16:07
1
1
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
thanks i will try that...wish i cud upvote you, but dont have enough rep
– sigmoid
Mar 10 at 3:01
1
1
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now– sigmoid
Mar 11 at 9:15
TORCH_HOME=/mnt/test/torch export TORCH_HOME;cd /mnt/test;python imgc_pytorch.py
did the trick. Works fine now– sigmoid
Mar 11 at 9:15
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073757%2fpytorch-permissionerror-errno-13-permission-denied-torch%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I am deploying this code on a GPU cluster provided by my company
– sigmoid
Mar 9 at 3:46