From nobody Sat Apr 22 08:46:31 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q3Q4c3zRRz46Qql; Sat, 22 Apr 2023 08:47:12 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q3Q4Z6Qmlz4Dlj; Sat, 22 Apr 2023 08:47:10 +0000 (UTC) (envelope-from odhiambo@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b="mYJP/Zb/"; spf=pass (mx1.freebsd.org: domain of odhiambo@gmail.com designates 2a00:1450:4864:20::130 as permitted sender) smtp.mailfrom=odhiambo@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4edb93139ddso2559304e87.0; Sat, 22 Apr 2023 01:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682153229; x=1684745229; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X8L79GtmAOoH6Mfs6v3li/Aum08KPYYsx1QMdcRvDI0=; b=mYJP/Zb/hjNeIvLLcQqjyXnZVo1NdwP/l/PdXlpB6fKqLXmptOPSCILSv9fMNSWecP WIo4qouEuTFBi8KEpQrrpbpYXv+Q6tnuCepkJf7FMQCPjQGA3IPjOuxAxwSdeLlRDqeX n/NMrmdDPbVnPdomT15gzEpeaHJ46SvfxreKK2AhmAmTMF0eZQADH2EnpS9kCeppREvL n2eg1dnG1UXrB+VZLMWJFtHZLx21oVgv4RY4EIO5HAyFY8+JSJIP1fFx14PaljhOn0XI eIx4XQforQQFbznhAPZYpGicPXfwjeoMiKMG9fU5AqcSPq4niMaVP1TwyYqudAxh5gKc qlSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682153229; x=1684745229; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X8L79GtmAOoH6Mfs6v3li/Aum08KPYYsx1QMdcRvDI0=; b=QQsgcyRhcjWS45lPzNFcYLvY5tRlqY/Z3Az/50aCtn6+g2yOUsJiuJpeO73GcKYm81 FUpDS/Z4LjRcuq+XBIs8Sqs+Eu5H/ennUJZ1K3ptTwQ5yvSWPAHEF7TkNds+R2cfSOjs TEKvBaJy0JflEzg3CTzPf+FJYiXlNPCmHdVSb/0gs+Rff0a6Az4rGi0ONvyq+4dE+c4c jRfvcZLVov2beuMW09UEAMuBgZjaLIm2iV/Py4TVJh4THu8WlyQV59ftt7amxiKkryQO ib82+tnsP1sPxueUzZATzE4CwU1XT9he/BsZmDpFVCpcFlArI2DxXaJsqx3pY7yU8Ygg FHwA== X-Gm-Message-State: AAQBX9cWA90Kf5fY1z2sAoQr9YnEAC5FiLr7ouupjLctXugNk4lAUzLh Ry4iC1KMdRg2tiTockk747jnbNVAaQpsAkgfbhtragkVRzfX1w== X-Google-Smtp-Source: AKy350aES6zGAStqROOx5y0Eq2t71jKf7hkery77Qt4QgwpczYsEJNFAiIZU7QQho8oJNFs6WaQUr9Y3h1jz+7x0XQE= X-Received: by 2002:a19:ae0a:0:b0:4ea:fabb:4db1 with SMTP id f10-20020a19ae0a000000b004eafabb4db1mr1830525lfc.1.1682153228523; Sat, 22 Apr 2023 01:47:08 -0700 (PDT) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Odhiambo Washington Date: Sat, 22 Apr 2023 11:46:31 +0300 Message-ID: Subject: Re: Installing openAI's GPT-2 Ada AI Language Model To: Aryeh Friedman Cc: Mario Marietto , FreeBSD Mailing List , FreeBSD Mailing List , Yuri Victorovich Content-Type: multipart/alternative; boundary="000000000000a4deaa05f9e8d194" X-Spamd-Result: default: False [-3.23 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.23)[-0.233]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TAGGED_RCPT(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::130:server fail]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,freebsd-questions@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::130:from]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-Rspamd-Queue-Id: 4Q3Q4Z6Qmlz4Dlj X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --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 wrote: > On Fri, Apr 21, 2023 at 8:31=E2=80=AFAM Mario Marietto > 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 > import model, sample, encoder > File "/usr/opt/babySpock/gpt-2/src/model.py", line 3, in > 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


=
On Sat, Apr 22, 2023 at 11:20=E2=80= =AFAM Aryeh Friedman <aryeh.= friedman@gmail.com> wrote:
On Fri, Apr 21, 2023 at 8:31=E2=80=AFAM Mario Marietto &l= t;marietto2008@= gmail.com> wrote:
>
> If you don't want to use the GPU,the commands should be more or le= ss the following :
>
>
> sudo touch /usr/local/etc/rc.d/ubuntu && chmod +x /usr/local/e= tc/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()
> {
>=C2=A0 =C2=A0 =C2=A0[ `stat -f "%d" "$1"` =3D=3D `s= tat -f "%d" "$1/.."` -a \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0`stat -f "%i" "$1"` !=3D= `stat -f "%i" "$1/.."` ]
> }
>
> ubuntu_start()
> {
>=C2=A0 =C2=A0 =C2=A0local _emul_path _tmpdir
>
>=C2=A0 =C2=A0 =C2=A0load_kld -e 'linux(aout|elf)' linux
>=C2=A0 =C2=A0 =C2=A0case `sysctl -n hw.machine_arch` in
>=C2=A0 =C2=A0 =C2=A0amd64)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0load_kld -e 'linux64elf' linu= x64
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;
>=C2=A0 =C2=A0 =C2=A0esac
>=C2=A0 =C2=A0 =C2=A0if [ -x /compat/ubuntu/sbin/ldconfigDisabled ]; the= n
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0_tmpdir=3D`mktemp -d -t linux-ldconfi= g`
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/compat/ubuntu/sbin/ldconfig -C ${_tm= pdir}/ld.so.cache
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ! cmp -s ${_tmpdir}/ld.so.cache /c= ompat/ubuntu/etc/ld.so.cache; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cat ${_tmpdir}/ld.so.ca= che > /compat/ubuntu/etc/ld.so.cache
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fi
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rm -rf ${_tmpdir}
>=C2=A0 =C2=A0 =C2=A0fi
>
>=C2=A0 =C2=A0 =C2=A0# Linux uses the pre-pts(4) tty naming scheme.
>=C2=A0 =C2=A0 =C2=A0load_kld pty
>
>=C2=A0 =C2=A0 =C2=A0# Handle unbranded ELF executables by defaulting to= ELFOSABI_LINUX.
>=C2=A0 =C2=A0 =C2=A0if [ `sysctl -ni kern.elf64.fallback_brand` -eq &qu= ot;-1" ]; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sysctl kern.elf64.fallback_brand=3D3 = > /dev/null
>=C2=A0 =C2=A0 =C2=A0fi
>
>=C2=A0 =C2=A0 =C2=A0if [ `sysctl -ni kern.elf32.fallback_brand` -eq &qu= ot;-1" ]; then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sysctl kern.elf32.fallback_brand=3D3 = > /dev/null
>=C2=A0 =C2=A0 =C2=A0fi
>=C2=A0 =C2=A0 =C2=A0sysctl compat.linux.emul_path=3D/compat/ubuntu
>
>=C2=A0 =C2=A0 =C2=A0_emul_path=3D"/compat/ubuntu"
>=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/dev" && = (mount -o nocover -t devfs devfs "${_emul_path}/dev" || exit 1) >=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/dev/fd" &&am= p; (mount -o nocover,linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd= " || exit 1)
>=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/dev/shm" &&a= mp; (mount -o nocover,mode=3D1777 -t tmpfs tmpfs "${_emul_path}/dev/sh= m" || exit 1)
>=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/home" &&= (mount -t nullfs /home "${_emul_path}/home" || exit 1)
>=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/proc" &&= (mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" ||= exit 1)
>=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/sys" && = (mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" || exi= t 1)
>=C2=A0 =C2=A0 =C2=A0unmounted "${_emul_path}/tmp" && = (mount -t nullfs /tmp "${_emul_path}/tmp" || exit 1)
>=C2=A0 =C2=A0 =C2=A0unmounted /dev/fd && (mount -o nocover -t f= descfs fdescfs /dev/fd || exit 1)
>=C2=A0 =C2=A0 =C2=A0unmounted /proc && (mount -o nocover -t pro= cfs procfs /proc || exit 1)
>=C2=A0 =C2=A0 =C2=A0true
> }
>
> 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:<= br> > 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/adjtim= e
> 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 m= ain restricted universe multiverse" > /etc/apt/sources.list
>
> # Install required programs:
>
> apt update ; apt install -y apt-transport-https curl fonts-symbola gnu= pg 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.githubuse= rcontent.com/shkhln/40ef290463e78fb2b0000c60f4ad797e/raw/f640983249607e38af= 405c95c457ce4afc85c608/uvm_ioctl_override.c
>
> # /compat/ubuntu/bin/gcc --sysroot=3D/compat/ubuntu -m64 -std=3Dc99 -W= all -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):
=C2=A0 File "/usr/opt/babySpock/gpt-2/src/generate_unconditional_sampl= es.py",
line 9, in <module>
=C2=A0 =C2=A0 import model, sample, encoder
=C2=A0 File "/usr/opt/babySpock/gpt-2/src/model.py", line 3, in &= lt;module>
=C2=A0 =C2=A0 from tensorflow.contrib.training import HParams
ModuleNotFoundError: No module named 'tensorflow.contrib'

Use Python3.7 or earlier.

--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200= 0004/+254 7 2274 3223
"Oh, the cr= uft.",=C2=A0egrep -v '^$|^.*#'=C2=A0=C2=AF\_(=E3=83=84)_/=C2=AF=C2= =A0:-)
[How to ask smart = questions:=C2=A0http://www.ca= tb.org/~esr/faqs/smart-questions.html]
--000000000000a4deaa05f9e8d194--