Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Apr 2023 11:46:31 +0300
From:      Odhiambo Washington <odhiambo@gmail.com>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        Mario Marietto <marietto2008@gmail.com>,  FreeBSD Mailing List <freebsd-hackers@freebsd.org>,  FreeBSD Mailing List <freebsd-questions@freebsd.org>, Yuri Victorovich <yuri@freebsd.org>
Subject:   Re: Installing openAI's GPT-2 Ada AI Language Model
Message-ID:  <CAAdA2WP5_OT3Jge37EzS_p65gM59gpQ7%2By3jhQ3RHfAr-v5SLA@mail.gmail.com>
In-Reply-To: <CAGBxaXnxvU7oKNVO8uZwLhFNQzzVSxkAuTUqWNjwJz_eyYDncA@mail.gmail.com>
References:  <CAGBxaXmhRLk9Lx_ZHeRdoN-K2fRLEhY3cBVtBymmAjd4bBh1OQ@mail.gmail.com> <CA%2B1FSihQ-f4uhiOjYH8Wo=AxFEkAKe3NRDJdopgT50J=_jY4fA@mail.gmail.com> <CAGBxaXnYojzQJqO62hkzUJvD2rzaNp%2Bem38FgCqVSBu%2BmkBi9A@mail.gmail.com> <CA%2B1FSijpiko%2B%2B%2BwJuXo2GVV6sz3yGVi7ig0X3037%2B1zE3n91hg@mail.gmail.com> <CAGBxaX=OcaHEZk3S7jQeYW64A_iRNTmJ%2Bab4U7h_hsrG%2BQqQPg@mail.gmail.com> <ZEEnZjzDCtR_ZG4P@graf.pompo.net> <CAGBxaXmU=Ja9EkoMyxQ0cNxYB4BeiktqQ3P64QcWg%2B=xijTiyQ@mail.gmail.com> <CA%2B1FSii6OOwi%2B%2Bau-_9ViU_SMZ%2BGbESG5H0McVTHQUwmMnOJGQ@mail.gmail.com> <CAGBxaXkhC--ZppimDFabEwPhesjAJmrziNZm753eoyjy1sWzqg@mail.gmail.com> <CA%2B1FSijsSSpCFeKeaOt4gR36BAZ4J8j4QSJRJa-VF-a=J9e2uw@mail.gmail.com> <CAGBxaXnEajP_NKdgDtreavm1Gz5jyLE8-jQBxM9ALX%2BQ9Cpidw@mail.gmail.com> <CA%2B1FSiiyg8An7HwZrJOd=cKh1%2BNC-FMzgaQNfiHP9fkwpgbAEg@mail.gmail.com> <CAGBxaXmnsAQwfeSjGT4K3M2oNvSTpXYfrErRt3UbMvxpCD4htw@mail.gmail.com> <CA%2B1FSiiLEjNTXg5Nj-mxrV6n64gcSa0DXcu=U6a39Dz2fyQahA@mail.gmail.com> <CAGBxaXnxvU7oKNVO8uZwLhFNQzzVSxkAuTUqWNjwJz_eyYDncA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000a4deaa05f9e8d194
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 22, 2023 at 11:20=E2=80=AFAM Aryeh Friedman <aryeh.friedman@gma=
il.com>
wrote:

> On Fri, Apr 21, 2023 at 8:31=E2=80=AFAM Mario Marietto <marietto2008@gmai=
l.com>
> wrote:
> >
> > If you don't want to use the GPU,the commands should be more or less th=
e
> following :
> >
> >
> > sudo touch /usr/local/etc/rc.d/ubuntu && chmod +x
> /usr/local/etc/rc.d/ubuntu
> >
> > # Make it have this content:
> >
> > #!/bin/sh
> > #
> > # PROVIDE: ubuntu
> > # REQUIRE: archdep mountlate
> > # KEYWORD: nojail
> > #
> > # This is a modified version of /etc/rc.d/linux
> > # Based on the script by mrclksr:
> > #
> https://github.com/mrclksr/linux-browser-installer/blob/main/rc.d/ubuntu.=
in
> > #
> > . /etc/rc.subr
> >
> > name=3D"ubuntu"
> > desc=3D"Enable Ubuntu chroot, and Linux ABI"
> > rcvar=3D"ubuntu_enable"
> > start_cmd=3D"${name}_start"
> > stop_cmd=3D":"
> >
> > unmounted()
> > {
> >     [ `stat -f "%d" "$1"` =3D=3D `stat -f "%d" "$1/.."` -a \
> >       `stat -f "%i" "$1"` !=3D `stat -f "%i" "$1/.."` ]
> > }
> >
> > ubuntu_start()
> > {
> >     local _emul_path _tmpdir
> >
> >     load_kld -e 'linux(aout|elf)' linux
> >     case `sysctl -n hw.machine_arch` in
> >     amd64)
> >         load_kld -e 'linux64elf' linux64
> >         ;;
> >     esac
> >     if [ -x /compat/ubuntu/sbin/ldconfigDisabled ]; then
> >         _tmpdir=3D`mktemp -d -t linux-ldconfig`
> >         /compat/ubuntu/sbin/ldconfig -C ${_tmpdir}/ld.so.cache
> >         if ! cmp -s ${_tmpdir}/ld.so.cache
> /compat/ubuntu/etc/ld.so.cache; then
> >             cat ${_tmpdir}/ld.so.cache > /compat/ubuntu/etc/ld.so.cache
> >         fi
> >         rm -rf ${_tmpdir}
> >     fi
> >
> >     # Linux uses the pre-pts(4) tty naming scheme.
> >     load_kld pty
> >
> >     # Handle unbranded ELF executables by defaulting to ELFOSABI_LINUX.
> >     if [ `sysctl -ni kern.elf64.fallback_brand` -eq "-1" ]; then
> >         sysctl kern.elf64.fallback_brand=3D3 > /dev/null
> >     fi
> >
> >     if [ `sysctl -ni kern.elf32.fallback_brand` -eq "-1" ]; then
> >         sysctl kern.elf32.fallback_brand=3D3 > /dev/null
> >     fi
> >     sysctl compat.linux.emul_path=3D/compat/ubuntu
> >
> >     _emul_path=3D"/compat/ubuntu"
> >     unmounted "${_emul_path}/dev" && (mount -o nocover -t devfs devfs
> "${_emul_path}/dev" || exit 1)
> >     unmounted "${_emul_path}/dev/fd" && (mount -o nocover,linrdlnk -t
> fdescfs fdescfs "${_emul_path}/dev/fd" || exit 1)
> >     unmounted "${_emul_path}/dev/shm" && (mount -o nocover,mode=3D1777 =
-t
> tmpfs tmpfs "${_emul_path}/dev/shm" || exit 1)
> >     unmounted "${_emul_path}/home" && (mount -t nullfs /home
> "${_emul_path}/home" || exit 1)
> >     unmounted "${_emul_path}/proc" && (mount -o nocover -t linprocfs
> linprocfs "${_emul_path}/proc" || exit 1)
> >     unmounted "${_emul_path}/sys" && (mount -o nocover -t linsysfs
> linsysfs "${_emul_path}/sys" || exit 1)
> >     unmounted "${_emul_path}/tmp" && (mount -t nullfs /tmp
> "${_emul_path}/tmp" || exit 1)
> >     unmounted /dev/fd && (mount -o nocover -t fdescfs fdescfs /dev/fd |=
|
> exit 1)
> >     unmounted /proc && (mount -o nocover -t procfs procfs /proc || exit
> 1)
> >     true
> > }
> >
> > load_rc_config $name
> > run_rc_command "$1"
> >
> > sysrc ubuntu_enable=3DYES
> >
> > # Create necessary mount points for a working Linuxulator:
> > mkdir -p
> {/compat/ubuntu/dev/fd,/compat/ubuntu/dev/shm,/compat/ubuntu/home,/compat=
/ubuntu/tmp,/compat/ubuntu/proc,/compat/ubuntu/sys}
> >
> > # Start Ubuntu service:
> > service ubuntu start
> >
> > # Install needed packages:
> > pkg install debootstrap pulseaudio
> >
> > # Install Ubuntu 20.04 into /compat/ubuntu:
> > debootstrap --arch=3Damd64 --no-check-gpg focal /compat/ubuntu
> >
> > # Restart Ubuntu service to make sure everything is properly mounted:
> > service ubuntu restart
> >
> > # Fix broken symlink:
> > cd /compat/ubuntu/lib64/ && rm ./ld-linux-x86-64.so.2 ; ln -s
> ../lib/x86_64-linux-gnu/ld-2.31.so ld-linux-x86-64.so.2
> >
> > # Chroot into your Linux environment:
> > chroot /compat/ubuntu /bin/bash
> >
> > # Set correct timezone inside your chroot:
> > printf "%b\n" "0.0 0 0.0\n0\nUTC" > /etc/adjtime
> > sudo dpkg-reconfigure tzdata # For some reason sudo is necessary here,
> otherwise it fails.
> >
> > # Fix APT package manager:
> > printf "APT::Cache-Start 251658240;" > /etc/apt/apt.conf.d/00aptitude
> >
> > # Enable more repositories:
> > printf "deb http://archive.ubuntu.com/ubuntu/ focal main restricted
> universe multiverse" > /etc/apt/sources.list
> >
> > # Install required programs:
> >
> > apt update ; apt install -y apt-transport-https curl fonts-symbola gnup=
g
> pulseaudio build-essential gcc gfortran
> >
> > # Exit out of chroot
> > exit
> >
> > # Fix x86_64-linux-gnu libraries path between ubuntu and freebsd
> > cp -r /compat/ubuntu/usr/lib/x86_64-linux-gnu /lib
> >
> >
> > --> Installing PyTorch and your chatgpt github fork on FreeBSD
> >
> >
> > # fetch
> https://gist.githubusercontent.com/shkhln/40ef290463e78fb2b0000c60f4ad797=
e/raw/f640983249607e38af405c95c457ce4afc85c608/uvm_ioctl_override.c
> >
> > # /compat/ubuntu/bin/gcc --sysroot=3D/compat/ubuntu -m64 -std=3Dc99 -Wa=
ll
> -ldl -fPIC -shared -o dummy-uvm.so uvm_ioctl_override.c
> >
> > # pkg install linux-miniconda-installer
> > # miniconda-installer
> > # bash
> > # source /home/marietto/miniconda3/etc/profile.d/conda.sh
> > # conda activate
> >
> > (base) # conda activate pytorch
> >
> > (pytorch) # conda activate
> >
> > (base) # conda activate
> >
> > (base) # git clone your chatgpt github fork
>
>
> I have done that I think and get:
>
> (base) [babyspock@babyspock ~]$ python
> src/generate_unconditional_samples.py --model_name 117M --nsamples 5
> --length 512
> python: can't open file
> '/usr/opt/babySpock/src/generate_unconditional_samples.py': [Errno 2]
> No such file or directory
> (base) [babyspock@babyspock ~]$ cd gpt-2/
> (base) [babyspock@babyspock ~/gpt-2]$ python
> src/generate_unconditional_samples.py --model_name 117M --nsamples 5
> --length 512
> 2023-04-22 00:17:18.661083: I tensorflow/tsl/cuda/cudart_stub.cc:28]
> Could not find cuda drivers on your machine, GPU will not be used.
> 2023-04-22 00:17:18.710468: I tensorflow/tsl/cuda/cudart_stub.cc:28]
> Could not find cuda drivers on your machine, GPU will not be used.
> 2023-04-22 00:17:18.710951: I
> tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow
> binary is optimized to use available CPU instructions in
> performance-critical operations.
> To enable the following instructions: AVX2 FMA, in other operations,
> rebuild TensorFlow with the appropriate compiler flags.
> 2023-04-22 00:17:19.429409: W
> tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning:
> Could not find TensorRT
> Traceback (most recent call last):
>   File "/usr/opt/babySpock/gpt-2/src/generate_unconditional_samples.py",
> line 9, in <module>
>     import model, sample, encoder
>   File "/usr/opt/babySpock/gpt-2/src/model.py", line 3, in <module>
>     from tensorflow.contrib.training import HParams
> ModuleNotFoundError: No module named 'tensorflow.contrib'
>

Use Python3.7 or earlier.

--=20
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]

--000000000000a4deaa05f9e8d194
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Sat, Apr 22, 2023 at 11:20=E2=80=
=AFAM Aryeh Friedman &lt;<a href=3D"mailto:aryeh.friedman@gmail.com">aryeh.=
friedman@gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">On Fri, Apr 21, 2023 at 8:31=E2=80=AFAM Mario Marietto &l=
t;<a href=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@=
gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; If you don&#39;t want to use the GPU,the commands should be more or le=
ss the following :<br>
&gt;<br>
&gt;<br>
&gt; sudo touch /usr/local/etc/rc.d/ubuntu &amp;&amp; chmod +x /usr/local/e=
tc/rc.d/ubuntu<br>
&gt;<br>
&gt; # Make it have this content:<br>
&gt;<br>
&gt; #!/bin/sh<br>
&gt; #<br>
&gt; # PROVIDE: ubuntu<br>
&gt; # REQUIRE: archdep mountlate<br>
&gt; # KEYWORD: nojail<br>
&gt; #<br>
&gt; # This is a modified version of /etc/rc.d/linux<br>
&gt; # Based on the script by mrclksr:<br>
&gt; # <a href=3D"https://github.com/mrclksr/linux-browser-installer/blob/m=
ain/rc.d/ubuntu.in" rel=3D"noreferrer" target=3D"_blank">https://github.com=
/mrclksr/linux-browser-installer/blob/main/rc.d/ubuntu.in</a><br>
&gt; #<br>
&gt; . /etc/rc.subr<br>
&gt;<br>
&gt; name=3D&quot;ubuntu&quot;<br>
&gt; desc=3D&quot;Enable Ubuntu chroot, and Linux ABI&quot;<br>
&gt; rcvar=3D&quot;ubuntu_enable&quot;<br>
&gt; start_cmd=3D&quot;${name}_start&quot;<br>
&gt; stop_cmd=3D&quot;:&quot;<br>
&gt;<br>
&gt; unmounted()<br>
&gt; {<br>
&gt;=C2=A0 =C2=A0 =C2=A0[ `stat -f &quot;%d&quot; &quot;$1&quot;` =3D=3D `s=
tat -f &quot;%d&quot; &quot;$1/..&quot;` -a \<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0`stat -f &quot;%i&quot; &quot;$1&quot;` !=3D=
 `stat -f &quot;%i&quot; &quot;$1/..&quot;` ]<br>
&gt; }<br>
&gt;<br>
&gt; ubuntu_start()<br>
&gt; {<br>
&gt;=C2=A0 =C2=A0 =C2=A0local _emul_path _tmpdir<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0load_kld -e &#39;linux(aout|elf)&#39; linux<br>
&gt;=C2=A0 =C2=A0 =C2=A0case `sysctl -n hw.machine_arch` in<br>
&gt;=C2=A0 =C2=A0 =C2=A0amd64)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0load_kld -e &#39;linux64elf&#39; linu=
x64<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;<br>
&gt;=C2=A0 =C2=A0 =C2=A0esac<br>
&gt;=C2=A0 =C2=A0 =C2=A0if [ -x /compat/ubuntu/sbin/ldconfigDisabled ]; the=
n<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0_tmpdir=3D`mktemp -d -t linux-ldconfi=
g`<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/compat/ubuntu/sbin/ldconfig -C ${_tm=
pdir}/ld.so.cache<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ! cmp -s ${_tmpdir}/ld.so.cache /c=
ompat/ubuntu/etc/ld.so.cache; then<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cat ${_tmpdir}/ld.so.ca=
che &gt; /compat/ubuntu/etc/ld.so.cache<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fi<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rm -rf ${_tmpdir}<br>
&gt;=C2=A0 =C2=A0 =C2=A0fi<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0# Linux uses the pre-pts(4) tty naming scheme.<br>
&gt;=C2=A0 =C2=A0 =C2=A0load_kld pty<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0# Handle unbranded ELF executables by defaulting to=
 ELFOSABI_LINUX.<br>
&gt;=C2=A0 =C2=A0 =C2=A0if [ `sysctl -ni kern.elf64.fallback_brand` -eq &qu=
ot;-1&quot; ]; then<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sysctl kern.elf64.fallback_brand=3D3 =
&gt; /dev/null<br>
&gt;=C2=A0 =C2=A0 =C2=A0fi<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0if [ `sysctl -ni kern.elf32.fallback_brand` -eq &qu=
ot;-1&quot; ]; then<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sysctl kern.elf32.fallback_brand=3D3 =
&gt; /dev/null<br>
&gt;=C2=A0 =C2=A0 =C2=A0fi<br>
&gt;=C2=A0 =C2=A0 =C2=A0sysctl compat.linux.emul_path=3D/compat/ubuntu<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0_emul_path=3D&quot;/compat/ubuntu&quot;<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/dev&quot; &amp;&amp; =
(mount -o nocover -t devfs devfs &quot;${_emul_path}/dev&quot; || exit 1)<b=
r>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/dev/fd&quot; &amp;&am=
p; (mount -o nocover,linrdlnk -t fdescfs fdescfs &quot;${_emul_path}/dev/fd=
&quot; || exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/dev/shm&quot; &amp;&a=
mp; (mount -o nocover,mode=3D1777 -t tmpfs tmpfs &quot;${_emul_path}/dev/sh=
m&quot; || exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/home&quot; &amp;&amp;=
 (mount -t nullfs /home &quot;${_emul_path}/home&quot; || exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/proc&quot; &amp;&amp;=
 (mount -o nocover -t linprocfs linprocfs &quot;${_emul_path}/proc&quot; ||=
 exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/sys&quot; &amp;&amp; =
(mount -o nocover -t linsysfs linsysfs &quot;${_emul_path}/sys&quot; || exi=
t 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted &quot;${_emul_path}/tmp&quot; &amp;&amp; =
(mount -t nullfs /tmp &quot;${_emul_path}/tmp&quot; || exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted /dev/fd &amp;&amp; (mount -o nocover -t f=
descfs fdescfs /dev/fd || exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0unmounted /proc &amp;&amp; (mount -o nocover -t pro=
cfs procfs /proc || exit 1)<br>
&gt;=C2=A0 =C2=A0 =C2=A0true<br>
&gt; }<br>
&gt;<br>
&gt; load_rc_config $name<br>
&gt; run_rc_command &quot;$1&quot;<br>
&gt;<br>
&gt; sysrc ubuntu_enable=3DYES<br>
&gt;<br>
&gt; # Create necessary mount points for a working Linuxulator:<br>
&gt; mkdir -p {/compat/ubuntu/dev/fd,/compat/ubuntu/dev/shm,/compat/ubuntu/=
home,/compat/ubuntu/tmp,/compat/ubuntu/proc,/compat/ubuntu/sys}<br>
&gt;<br>
&gt; # Start Ubuntu service:<br>
&gt; service ubuntu start<br>
&gt;<br>
&gt; # Install needed packages:<br>
&gt; pkg install debootstrap pulseaudio<br>
&gt;<br>
&gt; # Install Ubuntu 20.04 into /compat/ubuntu:<br>
&gt; debootstrap --arch=3Damd64 --no-check-gpg focal /compat/ubuntu<br>
&gt;<br>
&gt; # Restart Ubuntu service to make sure everything is properly mounted:<=
br>
&gt; service ubuntu restart<br>
&gt;<br>
&gt; # Fix broken symlink:<br>
&gt; cd /compat/ubuntu/lib64/ &amp;&amp; rm ./ld-linux-x86-64.so.2 ; ln -s =
../lib/x86_64-linux-gnu/<a href=3D"http://ld-2.31.so" rel=3D"noreferrer" ta=
rget=3D"_blank">ld-2.31.so</a> ld-linux-x86-64.so.2<br>
&gt;<br>
&gt; # Chroot into your Linux environment:<br>
&gt; chroot /compat/ubuntu /bin/bash<br>
&gt;<br>
&gt; # Set correct timezone inside your chroot:<br>
&gt; printf &quot;%b\n&quot; &quot;0.0 0 0.0\n0\nUTC&quot; &gt; /etc/adjtim=
e<br>
&gt; sudo dpkg-reconfigure tzdata # For some reason sudo is necessary here,=
 otherwise it fails.<br>
&gt;<br>
&gt; # Fix APT package manager:<br>
&gt; printf &quot;APT::Cache-Start 251658240;&quot; &gt; /etc/apt/apt.conf.=
d/00aptitude<br>
&gt;<br>
&gt; # Enable more repositories:<br>
&gt; printf &quot;deb <a href=3D"http://archive.ubuntu.com/ubuntu/" rel=3D"=
noreferrer" target=3D"_blank">http://archive.ubuntu.com/ubuntu/</a>; focal m=
ain restricted universe multiverse&quot; &gt; /etc/apt/sources.list<br>
&gt;<br>
&gt; # Install required programs:<br>
&gt;<br>
&gt; apt update ; apt install -y apt-transport-https curl fonts-symbola gnu=
pg pulseaudio build-essential gcc gfortran<br>
&gt;<br>
&gt; # Exit out of chroot<br>
&gt; exit<br>
&gt;<br>
&gt; # Fix x86_64-linux-gnu libraries path between ubuntu and freebsd<br>
&gt; cp -r /compat/ubuntu/usr/lib/x86_64-linux-gnu /lib<br>
&gt;<br>
&gt;<br>
&gt; --&gt; Installing PyTorch and your chatgpt github fork on FreeBSD<br>
&gt;<br>
&gt;<br>
&gt; # fetch <a href=3D"https://gist.githubusercontent.com/shkhln/40ef29046=
3e78fb2b0000c60f4ad797e/raw/f640983249607e38af405c95c457ce4afc85c608/uvm_io=
ctl_override.c" rel=3D"noreferrer" target=3D"_blank">https://gist.githubuse=
rcontent.com/shkhln/40ef290463e78fb2b0000c60f4ad797e/raw/f640983249607e38af=
405c95c457ce4afc85c608/uvm_ioctl_override.c</a><br>
&gt;<br>
&gt; # /compat/ubuntu/bin/gcc --sysroot=3D/compat/ubuntu -m64 -std=3Dc99 -W=
all -ldl -fPIC -shared -o dummy-uvm.so uvm_ioctl_override.c<br>
&gt;<br>
&gt; # pkg install linux-miniconda-installer<br>
&gt; # miniconda-installer<br>
&gt; # bash<br>
&gt; # source /home/marietto/miniconda3/etc/profile.d/conda.sh<br>
&gt; # conda activate<br>
&gt;<br>
&gt; (base) # conda activate pytorch<br>
&gt;<br>
&gt; (pytorch) # conda activate<br>
&gt;<br>
&gt; (base) # conda activate<br>
&gt;<br>
&gt; (base) # git clone your chatgpt github fork<br>
<br>
<br>
I have done that I think and get:<br>
<br>
(base) [babyspock@babyspock ~]$ python<br>
src/generate_unconditional_samples.py --model_name 117M --nsamples 5<br>
--length 512<br>
python: can&#39;t open file<br>
&#39;/usr/opt/babySpock/src/generate_unconditional_samples.py&#39;: [Errno =
2]<br>
No such file or directory<br>
(base) [babyspock@babyspock ~]$ cd gpt-2/<br>
(base) [babyspock@babyspock ~/gpt-2]$ python<br>
src/generate_unconditional_samples.py --model_name 117M --nsamples 5<br>
--length 512<br>
2023-04-22 00:17:18.661083: I tensorflow/tsl/cuda/cudart_stub.cc:28]<br>
Could not find cuda drivers on your machine, GPU will not be used.<br>
2023-04-22 00:17:18.710468: I tensorflow/tsl/cuda/cudart_stub.cc:28]<br>
Could not find cuda drivers on your machine, GPU will not be used.<br>
2023-04-22 00:17:18.710951: I<br>
tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow<br>
binary is optimized to use available CPU instructions in<br>
performance-critical operations.<br>
To enable the following instructions: AVX2 FMA, in other operations,<br>
rebuild TensorFlow with the appropriate compiler flags.<br>
2023-04-22 00:17:19.429409: W<br>
tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning:<br>
Could not find TensorRT<br>
Traceback (most recent call last):<br>
=C2=A0 File &quot;/usr/opt/babySpock/gpt-2/src/generate_unconditional_sampl=
es.py&quot;,<br>
line 9, in &lt;module&gt;<br>
=C2=A0 =C2=A0 import model, sample, encoder<br>
=C2=A0 File &quot;/usr/opt/babySpock/gpt-2/src/model.py&quot;, line 3, in &=
lt;module&gt;<br>
=C2=A0 =C2=A0 from tensorflow.contrib.training import HParams<br>
ModuleNotFoundError: No module named &#39;tensorflow.contrib&#39;<br></bloc=
kquote><div></div></div><div><br></div>Use Python3.7 or earlier.<br clear=
=3D"all"><div><br></div><span class=3D"gmail_signature_prefix">-- </span><b=
r><div dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"l=
tr"><div>Best regards,<br>Odhiambo WASHINGTON,<br>Nairobi,KE<br>+254 7 3200=
 0004/+254 7 2274 3223<br>&quot;<span style=3D"font-size:12.8px">Oh, the cr=
uft.</span><span style=3D"font-size:12.8px">&quot;,=C2=A0</span><span style=
=3D"font-size:12.8px">egrep -v &#39;^$|^.*#&#39;=C2=A0</span><span style=3D=
"background-color:rgb(34,34,34);color:rgb(238,238,238);font-family:&quot;Lu=
cida Console&quot;,Consolas,&quot;Courier New&quot;,monospace;font-size:13.=
6px">=C2=AF\_(=E3=83=84)_/=C2=AF</span><span style=3D"font-size:12.8px">=C2=
=A0:-)</span></div><div><span style=3D"font-size:12.8px">[How to ask smart =
questions:=C2=A0</span><span style=3D"font-size:12.8px"><a href=3D"http://w=
ww.catb.org/~esr/faqs/smart-questions.html" target=3D"_blank">http://www.ca=
tb.org/~esr/faqs/smart-questions.html</a>]</span></div></div></div></div></=
div>

--000000000000a4deaa05f9e8d194--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAdA2WP5_OT3Jge37EzS_p65gM59gpQ7%2By3jhQ3RHfAr-v5SLA>