How to Configure Conda Repositories? (Python)

By Elina Floim ,Developer Support Engineer

July 1, 2021

< 1

In this short video, we will look at how to configure the Conda client to work with Artifactory. We will create local, remote, and virtual repositories before using the Conda client to resolve a package from Artifactory. Finally, we will use the JFrog CLI to upload a package to the Conda local repository we have just created. https://www.jfrog.com/confluence/disp…

Video Transcript


hi everyone
my name is elena from j for support and
today i’m going to show you how to
configure counter repositories
in other factory so let’s get started
okay before we begin let’s see we have
condom
installed on our machine so let’s run
calm down and we can see it and we have
the kind of client
that’s great now let’s move on
to artifactory
okay so we have our artifact right here
let’s do a we have our credentials set
let’s login great we’re logged in
now let’s create our counter
repositories
for this demo we’ll use the quick setup
tool this tool allows us
to quickly set up a local remote and
virtual repositories
so we’ll choose conda
great let’s choose a prefix for this
example
our use dev
let’s create
great all repositories were created
successfully
now we’ll configure our client to work
against artifactory
so we see our repositories are created
we have the virtual repository the local
repository
the remote repository
and the remote cache repository in which
our the factory will
cache the artifacts so let’s
go to our virtual repository
and let’s click the set me up button
we’ll have information on how to
configure the client and
later we’ll see how to resolve the
packages so
let’s put our credentials here
and here we can see the snippet that
other factory provides us
so in order today for the command line
clients work against artifactory uh we
first need to set
the contour repository in the dot condor
rc file
so our factory has the file already
ready for us
so what we’re going to do is copy this
to the clipboard
but first let’s see what the file
contains so we have the first
line that actually what it does it makes
kind of client use the specified
url uh when we specify the dash c flag
during the package installation second
line
adds our the factory to existing list of
conduct channels
to be used by the client and we have the
third line in the snippet that redefines
the list
of default channels to be used by the
client and restricted only to
artifactory
great if we want we can disable the
client
ssl validations and end the ssl verify
false flag
for this example we’ll just copy the
snippet
and we’ll head to our terminal window
great so we’re in the terminal window
now let’s go to our
uh anaconda root directory and create
the conda rc file
so i’ll go to root
anaconda we’ll see what we have here
great so now let’s create the conda
rc file
let’s face the snippet we copied earlier
here i’m going to change the ip address
to localhost as my artifactory
is configured on this localhost machine
great let’s save the file
great so we have the dot cond rc file
and now we can configure the client to
work against
artifactory so let’s give it a try
let’s install for this example an nginx
package
we’ll use the install command
and install nginx
we’ll proceed
great let’s go back to our factory
okay let’s head to our repositories
let’s refresh the repository
great we can see and we have some
folders here
and we have some packages that we have
just resolved
so as part of the resolution we can see
that we have
a few packages in the virtual repository
if we go to define the remote cache
we will see that the packages are now
cached
in our repository
great let’s use another example
let’s say we want to upload
some package to the
condo locker repository we can do the
following
for this example i’ll use jfx cli you
can use curl as well
this is up to your reference so
let’s do the jpeg rt user upload
i’m sorry rtu
let’s mention what file we want to
upload
so for this example i’ll take
this file and we need to mention the
repository name so
this will be
right see we have success
and we can see that we have the package
right here
this is how you configure the connect
client to work against artifactory
thank you guys for joining me i hope you
have enjoyed this
short video if you have any questions
or comments please feel free to leave
them in the comment section below
thank you