cs50 / cli Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://cs50.readthedocs.io/cs50/cli
License: GNU General Public License v3.0
Home Page: https://cs50.readthedocs.io/cs50/cli
License: GNU General Public License v3.0
cd ~
git clone [email protected]:cs50/cli.git
git checkout github-pages
make build
cd ~
git clone https://github.com/cs50/ap
cd ap
cli50 -f # note the -f, to ensure you use your local build of cs50/cli
bundle install
bundle exec jekyll build # yields error below
ls -l /var/lib/gems/2.5.0/specifications
Cf. rubygems/bundler#2136, but hasn't yielded solution, despite https://github.com/cs50/cli/blob/github-pages/Dockerfile#L79-L80.
However, running umask 0022
before bundle install
does fix. Exit CS50 CLI then re-start with cli50 -f
step above to try again.
$ bundle exec jekyll build
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
Errno::EACCES: Permission denied @ rb_sysopen - /var/lib/gems/2.5.0/specifications/minitest-5.11.3.gemspec
/usr/lib/ruby/2.5.0/rubygems/stub_specification.rb:118:in `initialize'
/usr/lib/ruby/2.5.0/rubygems/stub_specification.rb:118:in `open'
/usr/lib/ruby/2.5.0/rubygems/stub_specification.rb:118:in `data'
/usr/lib/ruby/2.5.0/rubygems/stub_specification.rb:208:in `valid?'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:768:in `select'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:768:in `gemspec_stubs_in'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:793:in `block in map_stubs'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:790:in `each'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:790:in `flat_map'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:790:in `map_stubs'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:782:in `installed_stubs'
/usr/lib/ruby/2.5.0/rubygems/specification.rb:850:in `stubs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/rubygems_integration.rb:817:in `all_specs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/source/rubygems.rb:350:in `block in installed_specs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/index.rb:11:in `build'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/source/rubygems.rb:349:in `installed_specs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/source/rubygems.rb:91:in `specs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/lazy_specification.rb:76:in `__materialize__'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/spec_set.rb:88:in `block in materialize'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/spec_set.rb:85:in `map!'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/spec_set.rb:85:in `materialize'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/definition.rb:171:in `specs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/definition.rb:238:in `specs_for'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/definition.rb:227:in `requested_specs'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:108:in `block in definition_method'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:20:in `setup'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler.rb:107:in `setup'
/var/lib/gems/2.5.0/gems/bundler-1.16.4/lib/bundler/setup.rb:10:in `<top (required)>'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
$ ls -l /var/lib/gems/2.5.0/specifications
total 432
-rw-r--r-- 1 root root 1965 Sep 2 00:37 activesupport-4.2.10.gemspec
-rw-r--r-- 1 root root 1656 Sep 2 00:36 addressable-2.5.2.gemspec
-rw-r--r-- 1 root root 1273 Sep 2 00:35 arr-pm-0.0.10.gemspec
-rw-r--r-- 1 root root 4073 Sep 2 00:35 asciidoctor-1.5.7.1.gemspec
-rw-r--r-- 1 root root 820 Sep 2 00:35 backports-3.11.4.gemspec
-rw-r--r-- 1 root root 2877 Sep 2 00:35 bundler-1.16.4.gemspec
-rw-r--r-- 1 root root 1360 Sep 2 00:35 cabin-0.9.0.gemspec
-rw-r--r-- 1 root root 2057 Sep 2 00:36 childprocess-0.9.0.gemspec
-rw-r--r-- 1 root root 820 Sep 2 00:35 clamp-1.0.1.gemspec
-rw-r--r-- 1 root root 1678 Sep 2 00:37 coffee-script-2.4.1.gemspec
-rw-r--r-- 1 root root 1044 Sep 2 00:37 coffee-script-source-1.11.1.gemspec
-rw-r--r-- 1 root root 1244 Sep 2 00:36 colorator-1.1.0.gemspec
-rw-r--r-- 1 root root 2601 Sep 2 00:36 commonmarker-0.17.11.gemspec
-rw-r--r-- 1 root root 1293 Sep 2 00:36 concurrent-ruby-1.0.5.gemspec
-rw-r--r-- 1 root root 3117 Sep 2 00:36 dnsruby-1.61.2.gemspec
-rw-r--r-- 1 root root 1492 Sep 2 00:36 dotenv-2.5.0.gemspec
-rw-r--r-- 1 root root 1378 Sep 2 00:36 em-websocket-0.5.1.gemspec
-rw-r--r-- 1 root root 1042 Sep 2 00:37 ethon-0.11.0.gemspec
-rw-r--r-- 1 root root 3599 Sep 2 00:36 eventmachine-1.2.7.gemspec
-rw-r--r-- 1 root root 1183 Sep 2 00:37 execjs-2.7.0.gemspec
-rw-r--r-- 1 root root 1117 Sep 2 00:37 faraday-0.15.2.gemspec
-rw-r--r-- 1 root root 2099 Sep 2 00:36 ffi-1.9.25.gemspec
-rw-r--r-- 1 root root 804 Sep 2 00:36 forwardable-extended-2.6.0.gemspec
-rw-r--r-- 1 root root 3623 Sep 2 00:36 fpm-1.10.2.gemspec
-rw-r--r-- 1 root root 850 Sep 2 00:37 gemoji-3.0.0.gemspec
-rw-r--r-- 1 root root 10975 Sep 2 00:37 github-pages-191.gemspec
-rw-r--r-- 1 root root 3025 Sep 2 00:37 github-pages-health-check-1.8.1.gemspec
-rw-r--r-- 1 root root 1671 Sep 2 00:37 html-pipeline-2.8.4.gemspec
-rw-r--r-- 1 root root 2290 Sep 2 00:36 http_parser.rb-0.6.0.gemspec
-rw-r--r-- 1 root root 1346 Sep 2 00:36 i18n-0.9.5.gemspec
-rw-r--r-- 1 root root 774 Sep 2 00:36 insist-1.0.0.gemspec
-rw-r--r-- 1 root root 2081 Sep 2 00:36 io-like-0.3.0.gemspec
-rw-r--r-- 1 root root 3421 Sep 2 00:36 jekyll-3.7.3.gemspec
-rw-r--r-- 1 root root 3421 Sep 2 00:39 jekyll-3.8.3.gemspec
-rw-r--r-- 1 root root 1850 Sep 2 00:39 jekyll-asciidoc-2.1.0.gemspec
-rw-r--r-- 1 root root 1972 Sep 2 00:37 jekyll-avatar-0.6.0.gemspec
-rw-r--r-- 1 root root 2133 Sep 2 00:37 jekyll-coffeescript-1.1.1.gemspec
-rw-r--r-- 1 root root 1943 Sep 2 00:36 jekyll-commonmark-1.2.0.gemspec
-rw-r--r-- 1 root root 1939 Sep 2 00:36 jekyll-commonmark-ghpages-0.1.5.gemspec
-rw-r--r-- 1 root root 1420 Sep 2 00:37 jekyll-default-layout-0.1.4.gemspec
-rw-r--r-- 1 root root 2121 Sep 2 00:37 jekyll-feed-0.10.0.gemspec
-rw-r--r-- 1 root root 2126 Sep 2 00:37 jekyll-gist-1.5.0.gemspec
-rw-r--r-- 1 root root 2081 Sep 2 00:37 jekyll-github-metadata-2.9.4.gemspec
-rw-r--r-- 1 root root 1809 Sep 2 00:37 jekyll-mentions-1.4.1.gemspec
-rw-r--r-- 1 root root 1449 Sep 2 00:37 jekyll-optional-front-matter-0.3.0.gemspec
-rw-r--r-- 1 root root 1545 Sep 2 00:37 jekyll-paginate-1.1.0.gemspec
-rw-r--r-- 1 root root 1423 Sep 2 00:37 jekyll-readme-index-0.2.0.gemspec
-rw-r--r-- 1 root root 1973 Sep 2 00:37 jekyll-redirect-from-0.14.0.gemspec
-rw-r--r-- 1 root root 1454 Sep 2 00:37 jekyll-relative-links-0.5.3.gemspec
-rw-r--r-- 1 root root 2456 Sep 2 00:37 jekyll-remote-theme-0.3.1.gemspec
-rw-r--r-- 1 root root 1888 Sep 2 00:36 jekyll-sass-converter-1.5.2.gemspec
-rw-r--r-- 1 root root 2028 Sep 2 00:37 jekyll-seo-tag-2.5.0.gemspec
-rw-r--r-- 1 root root 1956 Sep 2 00:37 jekyll-sitemap-1.2.0.gemspec
-rw-r--r-- 1 root root 1391 Sep 2 00:37 jekyll-swiss-0.4.0.gemspec
-rw-r--r-- 1 root root 1860 Sep 2 00:37 jekyll-theme-architect-0.1.1.gemspec
-rw-r--r-- 1 root root 1845 Sep 2 00:37 jekyll-theme-cayman-0.1.1.gemspec
-rw-r--r-- 1 root root 1843 Sep 2 00:37 jekyll-theme-dinky-0.1.1.gemspec
-rw-r--r-- 1 root root 1849 Sep 2 00:37 jekyll-theme-hacker-0.1.1.gemspec
-rw-r--r-- 1 root root 1856 Sep 2 00:37 jekyll-theme-leap-day-0.1.1.gemspec
-rw-r--r-- 1 root root 1849 Sep 2 00:37 jekyll-theme-merlot-0.1.1.gemspec
-rw-r--r-- 1 root root 1856 Sep 2 00:37 jekyll-theme-midnight-0.1.1.gemspec
-rw-r--r-- 1 root root 1851 Sep 2 00:37 jekyll-theme-minimal-0.1.1.gemspec
-rw-r--r-- 1 root root 1861 Sep 2 00:37 jekyll-theme-modernist-0.1.1.gemspec
-rw-r--r-- 1 root root 2062 Sep 2 00:37 jekyll-theme-primer-0.5.3.gemspec
-rw-r--r-- 1 root root 1844 Sep 2 00:37 jekyll-theme-slate-0.1.1.gemspec
-rw-r--r-- 1 root root 1850 Sep 2 00:37 jekyll-theme-tactile-0.1.1.gemspec
-rw-r--r-- 1 root root 1874 Sep 2 00:37 jekyll-theme-time-machine-0.1.1.gemspec
-rw-r--r-- 1 root root 1476 Sep 2 00:37 jekyll-titles-from-headings-0.5.1.gemspec
-rw-r--r-- 1 root root 1984 Sep 2 00:36 jekyll-watch-2.0.0.gemspec
-rw-r--r-- 1 root root 1972 Sep 2 00:37 jemoji-0.10.1.gemspec
-rw-r--r-- 1 root root 1769 Sep 2 00:35 json-1.8.6.gemspec
-rw-r--r-- 1 root root 3186 Sep 2 00:36 kramdown-1.17.0.gemspec
-rw-r--r-- 1 root root 1400 Sep 2 00:36 liquid-4.0.0.gemspec
-rw-r--r-- 1 root root 1904 Sep 2 00:36 listen-3.1.5.gemspec
-rw-r--r-- 1 root root 1540 Sep 2 00:36 mercenary-0.3.6.gemspec
-rw-r--r-- 1 root root 1632 Sep 2 00:37 minima-2.5.0.gemspec
-rw-r--r-- 1 root root 2247 Sep 2 00:37 mini_portile2-2.3.0.gemspec
-rw------- 1 root root 4804 Sep 2 01:25 minitest-5.11.3.gemspec
-rw-r--r-- 1 root root 2704 Sep 2 00:39 multi_json-1.13.1.gemspec
-rw-r--r-- 1 root root 1020 Sep 2 00:36 multipart-post-2.0.0.gemspec
-rw-r--r-- 1 root root 2388 Sep 2 00:36 mustache-0.99.8.gemspec
-rw-r--r-- 1 root root 7635 Sep 2 00:37 nokogiri-1.8.4.gemspec
-rw-r--r-- 1 root root 1491 Sep 2 00:37 octokit-4.11.0.gemspec
-rw-r--r-- 1 root root 1141 Sep 2 00:36 pathutil-0.16.1.gemspec
-rw-r--r-- 1 root root 2004 Sep 2 00:36 pleaserun-0.0.30.gemspec
-rw-r--r-- 1 root root 1638 Sep 2 00:36 public_suffix-2.0.5.gemspec
-rw-r--r-- 1 root root 1510 Sep 2 00:39 pygments.rb-1.2.1.gemspec
-rw-r--r-- 1 root root 1802 Sep 2 00:36 rb-fsevent-0.10.3.gemspec
-rw-r--r-- 1 root root 1661 Sep 2 00:36 rb-inotify-0.9.10.gemspec
-rw-r--r-- 1 root root 885 Sep 2 00:36 rouge-2.2.1.gemspec
-rw-r--r-- 1 root root 1254 Sep 2 00:36 ruby_dep-1.5.0.gemspec
-rw-r--r-- 1 root root 999 Sep 2 00:36 ruby-enum-0.7.2.gemspec
-rw-r--r-- 1 root root 2062 Sep 2 00:36 ruby-xz-0.2.3.gemspec
-rw-r--r-- 1 root root 1818 Sep 2 00:37 rubyzip-1.2.2.gemspec
-rw-r--r-- 1 root root 924 Sep 2 00:36 safe_yaml-1.0.4.gemspec
-rw-r--r-- 1 root root 2840 Sep 2 00:36 sass-3.5.7.gemspec
-rw-r--r-- 1 root root 1625 Sep 2 00:36 sass-listen-4.0.0.gemspec
-rw-r--r-- 1 root root 1273 Sep 2 00:37 sawyer-0.8.1.gemspec
-rw-r--r-- 1 root root 1297 Sep 2 00:36 stud-0.0.23.gemspec
-rw-r--r-- 1 root root 2012 Sep 2 00:37 terminal-table-1.8.0.gemspec
-rw-r--r-- 1 root root 1574 Sep 2 00:37 thread_safe-0.3.6.gemspec
-rw-r--r-- 1 root root 1267 Sep 2 00:37 typhoeus-1.3.0.gemspec
-rw-r--r-- 1 root root 2754 Sep 2 00:37 tzinfo-1.2.5.gemspec
-rw-r--r-- 1 root root 1642 Sep 2 00:37 unicode-display_width-1.4.0.gemspec
The Python module '_sqlite3' appears to be missing in the IDE, which causes locally run SQL checks to fail immediately:
Results for bjorn-out/webprogrammeren/patch-3/movies generated by check50 v3.2.0
:) SQL files exists
:( 1.sql produces correct result
Error when executing query: No module named '_sqlite3'
Running the same check online does work as expected:
Results for bjorn-out/webprogrammeren/patch-3/movies generated by check50 v3.1.2
:) SQL files exists
:) 1.sql produces correct result
Attempting to import '_sqlite3' in the interactive Python shell confirms it is unavailable:
>>> import _sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named '_sqlite3'
This appears to be an issue with the installation of Python (see https://unix.stackexchange.com/questions/610875/modulenotfounderror-no-module-named-sqlite3), but I cannot really try anything out myself as the suggested solutions require root access.
Currently fails with
Error: buildx failed with: error: failed to solve: process "/bin/sh -c curl https://packagecloud.io/install/repositories/cs50/repo/script.deb.sh | bash && apt update && apt install --yes libcs50" did not complete successfully: exit code: 100
presumably because libcs50 isn't built for linux/arm64.
Cf. https://github.com/cs50/cli/runs/4276713508?check_suite_focus=true
Cf. https://www.sqlite.org/forum/forumpost/0ad1813ded.
$ sqlite3
sqlite>
versus:
$ sqlite3
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite>
Currently, the IDE is running v3.22.0 2018-01-22 18:45:57
The current version is from June 2020: v3.32.3 (https://www.sqlite.org/changes.html)
I just want to make a custom docker image based on cs50/cli and cs50/codespace that uses archlinux. Can't do it with current licencing i.e., no licence. Same goes for https://github.com/cs50/codespace.
Might have to build from source instead. Currently, java
errs on arm64 with:
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
If run by non-root
user.
Seems to happen in latest cli50
with v14.1.0 but also with v14.0.0 and v13.1.0, with or without our /opt/cs50/bin
wrapper:
(In particular, seems to happen with -a 0.0.0.0
but not, e.g., -a 127.0.01
, but I believe former has been necessary in IDE to bind to virtual NICs.)
E.g.:
$ http-server
Starting up http-server, serving ./
http-server version: 14.1.0
http-server settings:
CORS: true
Cache: -1 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: not visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none
Available on:
Hit CTRL-C to stop the server
C:\tools\Cmder
λ cli50
Using default tag: latest
latest: Pulling from cs50/cli
Digest: sha256:d9bc084486eb3cbe444416625dff1737afa5a187e0199d8395b57ecd5f77d1cb
Status: Image is up to date for cs50/cli:latest
Traceback (most recent call last):
File "C:\Python37\Scripts\cli50-script.py", line 11, in
load_entry_point('cli50==3.0.0', 'console_scripts', 'cli50')()
File "c:\python37\lib\site-packages\cli50_main_.py", line 172, in main
child = pexpect.spawn("docker", ["start", "--attach", "--interactive", container], dimensions=(lines, columns),
AttributeError: module 'pexpect' has no attribute 'spawn'
Working on Win10, Docker Desktop, Python 3.7
Just very fragile, breaks every time Ubuntu updates this library, since the old one disappears from their mirror.
Lines 199 to 205 in e902af1
On first run, outputs this then exits:
% cli50
Error: No such container: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
f2d65406c05c556aac0271ba2e9d16f98dbfa0c6476bab7db6dd67cb35a6f1be
On subsequent runs, outputs this but container starts:
% cli50
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
0.0.0.0:55005->8080/tcp, 0.0.0.0:55004->8081/tcp, 0.0.0.0:55003->8082/tcp
/mnt/ $
FLASK_APP
FLASK_DEBUG
PYTHONDONTWRITEBYTECODE
We have been unable to install any pip packages in the IDE in a way in which they persist after a reboot. The folder /usr/local/lib/python3.9/site-packages
is not writable. Anything directly in ~
is removed upon reboot, such as the ~/.local/lib/python3.9
folder in which pip performs 'user installs'.
Is there a way in which to install packages in the IDE so they persist after a reboot?
Just seeing amd64 at https://hub.docker.com/r/cs50/cli/tags, so jekyll
is still erring on M1 Macs with:
/usr/local/lib/ruby/gems/3.0.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:69:in `initialize': Function not implemented - Failed to initialize inotify (Errno::ENOSYS)
Hi there and good day! Just wanted to check if the yarn package still really is in the Dockerfile for cs50 Codespaces.
I keep trying to run yarn in the terminal and it keeps saying "command not found." I checked the updated cs50/cli Github Dockerfile and cross-checked it with the Dockerfile from Docker Hub, and it seems that the installation of yarn packages has disappeared (from the Github Dockerfile). Just wanna know if that's intentional and if yes, would there be a workaround if I need the yarn package?
Thank you so much for all that you do and I hope you have a great weekend (Or great week ahead if you see this on Monday),
Annika
So that, e.g., pip3
is in PATH
in Dockerfile
so we don't need to prepend "$PYENV_ROOT"/shims/
anymore.
Scripts in /etc/profile.d
are run by sh
too so bash
-only scripts shouldn't be there unless they handle sh
? The git-prompt.sh
is one example. Perhaps this should be placed in ~
and sourced as part of .bashrc
?
@dmalan @crossroads1112 @glennholloway
Lines 37 to 39 in 9eec861
pyenv
for consistency and easier management of versions?A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.