grok-1 icon indicating copy to clipboard operation
grok-1 copied to clipboard

No such a directory 'Dev'

Open spacewalk01 opened this issue 1 year ago • 4 comments

Hi thank you for opensourcing your model. However, I got the following error when I run run.py:

FileNotFoundError: [Errno 2] No such file or directory: 'D:\\dev\\shm\\tmpqye6hukj'

Note that I am running it on a windows machine. Thanks.

spacewalk01 avatar Mar 21 '24 07:03 spacewalk01

Check the File or Directory Path: Verify that the path 'D:\dev\shm\tmpqye6hukj' is correct. Make sure there are no typos or errors in the path.

cog-master avatar Mar 21 '24 09:03 cog-master

要懂 Linux、k8s/docker、CUDA或TPU 之类的才行。要本地跑的话,至少要8块A100 GPU卡(约80万人民币),一般是服务器才能装得了这种配置。

superguo avatar Mar 22 '24 12:03 superguo

update checkpoint.py:50 may fix this error

tmp_dir = "/dev/shm/" --> tmp_dir = "your exist dir"

yangjiandan avatar Mar 22 '24 15:03 yangjiandan

these 2 functions can be changed for windows

update checkpoint.py

@contextlib.contextmanager def copy_to_shm(file: str): tmp_dir = tempfile.gettempdir() fd, tmp_path = tempfile.mkstemp(dir=tmp_dir) try: shutil.copyfile(file, tmp_path) yield tmp_path finally: os.close(fd) os.remove(tmp_path)

@contextlib.contextmanager def copy_from_shm(file: str): tmp_dir = tempfile.gettempdir() fd, tmp_path = tempfile.mkstemp(dir=tmp_dir) try: yield tmp_path shutil.copyfile(tmp_path, file) finally: os.close(fd) os.remove(tmp_path)

Vysokostnyi avatar Mar 24 '24 09:03 Vysokostnyi