Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh doesn't do anything on Windows 10 #57

Closed
JoeUX opened this issue Feb 19, 2019 · 8 comments
Closed

sh doesn't do anything on Windows 10 #57

JoeUX opened this issue Feb 19, 2019 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@JoeUX
Copy link

JoeUX commented Feb 19, 2019

Hello, what operating system do the instructions apply to? sh doesn't do anything on Windows 10. How would I install this on Win10?

Also, is the first step to clone the repo? The instructions don't seem to make sense otherwise.

Thanks.

@JoeUX JoeUX changed the title What operating system do the instruction apply to? What operating system do the instructions apply to? Feb 19, 2019
@WuTheFWasThat
Copy link
Collaborator

hi! a pull request to make the scripts work well on windows would be very welcome! perhaps it'd be best to port the download_model script to python

@WuTheFWasThat WuTheFWasThat changed the title What operating system do the instructions apply to? sh doesn't do anything on Windows 10 Feb 19, 2019
@JoeUX
Copy link
Author

JoeUX commented Feb 20, 2019

Which OS does it require in its current form? And do we need to clone the repo to follow the steps? The Python command doesn't have a URL, so it seems like it's directory-dependent. If we need to clone first, that would be a good step to add – much or most software doesn't require cloning the repo, so if that's required here it's worth mentioning.

@WuTheFWasThat
Copy link
Collaborator

yes, cloning the repo is necessary. will add

@WuTheFWasThat WuTheFWasThat added the help wanted Extra attention is needed label Feb 20, 2019
@barnebyte
Copy link

barnebyte commented Feb 20, 2019

Hi, i'm experimenting on Windows 10 OS and i'm using Anaconda Navigator. This was the installation for me:

  1. Open Anaconda and create a new virtual environment (i was using Python 3.5).

  2. Clone the repo:
    git clone https://github.com/openai/gpt-2.git

  3. Install dependencies (if they're not installed):
    pip install fire>=0.1.3
    pip install tensorflow>=1.12
    pip install regex==2017.4.5

  4. Open the folder:
    cd gpt-2

  5. Download the model files (i was using hardcoded paths because the download_model script wasn't working):
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/checkpoint
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/encoder.json
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/hparams.json
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/model.ckpt.data-00000-of-00001
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/model.ckpt.index
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/model.ckpt.meta
    curl --output models/117M https://storage.googleapis.com/gpt-2/models/117M/vocab.bpe

  6. Run default unconditional sample with out.txt as output:
    python src/generate_unconditional_samples.py > out.txt

Hope it helps!

@kettenfett
Copy link

kettenfett commented Feb 20, 2019

How to use the 'sh' command in Windows 10

Windows 10 will deal with sh files and commands just fine, if you have GIT for Windows installed.

Another way is to activate "Windows Subsystem for Linux" in Windows 10 and then install ubuntu from the Microsoft Store. Now you can use the command 'bash' in cmd (or anaconda prompt) and it'll open a linux bash shell, where you can use the sh command, and any other linux command I presume.

If you do this, you won't have any problems setting up openai/gpt-2 on Windows 10.

@WuTheFWasThat
Copy link
Collaborator

nice, thanks for the info @philippHRO!

@JoeUX
Copy link
Author

JoeUX commented Feb 23, 2019

Yo, thanks for the info @barnebyte and @philippHRO, I'll try the Git for Windows route. I don't want Anaconda because it's such a large install. I think I can do everything here with normal Python.

So, I still have my original question. This issue was closed but my question (which used to be the title as well) hasn't been answered. What OSes does this run on by default? Is sh a universal command across Linux, or is it a bash-specific command? I plan to use Windows 10, and potentially FreeBSD and SmartOS. In FreeBSD, my shell is tcsh, not bash. I don't know much about shells, hence my question. (SmartOS is from Joyent, based on Illumos, which is based on Solaris).

@WuTheFWasThat
Copy link
Collaborator

bash should be fine, not sure about tcsh. really should just port the download script to python to avoid these considerations, made an issue: #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants