Open-source News

Running The New Open-Source NVIDIA GeForce RTX 30 Series Support In Linux 6.2

Phoronix - Tue, 12/20/2022 - 21:14
While NVIDIA is already out with multiple GeForce RTX 40 series products, coming only now with the Linux 6.2 kernel is initial open-source 3D acceleration support for the GeForce RTX 30 "Ampere" graphics processors. Here is my initial experience with this open-source NVIDIA GeForce RTX 30 series support in Linux 6.2.

Intel Sends Out Initial Linux Kernel Patches For FRED

Phoronix - Tue, 12/20/2022 - 19:16
Intel last year published documentation concerning a feature for future CPUs that they dubbed FRED, the Flexible Return and Event Delivery. FRED has the capability of helping system performance and response time while now initial patches for the Linux kernel have been published for supporting FRED...

Linux 6.2 Allows For Zstd-Compressed Debug Information

Phoronix - Tue, 12/20/2022 - 18:58
In addition to Linux 6.2 upgrading its Zstd implementation for speedier compression/decompression for in-kernel uses of the Zstandard compression algorithm, this new kernel version is adding another Zstd use-case: compressed debug info sections...

Linux Patches Posted For Enabling The Aquacomputer Aquaero

Phoronix - Tue, 12/20/2022 - 18:42
Over the past year we've seen a fair amount of work for enabling support for various Aquacomputer devices under Linux. The German parts vendor specializes in various PC cooling solutions and other cooling accessories that can be monitored and managed under Linux thanks to this open-source driver work...

Intel Releases oneDNN 3.0 In Advance Of Sapphire Rapids

Phoronix - Tue, 12/20/2022 - 18:14
Intel overnight released oneDNN 3.0 as the newest major release to this open-source project for assisting in building deep learning applications. This oneAPI software component can already be used by PyTorch, ONNX, MATLAB, and other prominent software while the v3.0 release prepares it for future Intel hardware...

How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command

Tecmint - Tue, 12/20/2022 - 16:24
The post How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

When making backups, and copying/moving large files on your Linux system, you may want to monitor the progress of an ongoing operation. Many terminal tools do not have the functionality to allow you to

The post How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

How I use Artipie, a PyPI repo

opensource.com - Tue, 12/20/2022 - 16:00
How I use Artipie, a PyPI repo olena Tue, 12/20/2022 - 03:00

While developing with Python as a student, I found that I needed some private centralized storage. This was so I could store binary and text data files, as well as Python packages. I found the answer in Artipie, an open source self-hosted software repository manager.

At university, my colleagues and I conducted research and worked with a lot of data from experimental measurements. I used Python to process and visualize them. My university colleagues at the time were mathematicians and didn't have experience with software development techniques. They usually just passed data and code on a flash drive or over email. My efforts to introduce them to a versioning system like Git were unsuccessful.

Python repository

Artipie supports the PyPI repository, making it compatible with both twine and pip. This means you can work with the Artipie Python repository exactly as you would when installing or publishing packages on the PyPI and TestPyPI repositories.

To create your own Python repository, you can use the hosted instance of Artipie called Artipie Central. Once you sign in, you see a page with your repositories listed (which is empty to begin with) and a form to add a new repository. Choose a name for your new repository (for example, mypython), select "Python" as the repository type, and then click the Add button.

Next, you see a page with repository settings in the YAML format:

---
​repo:
  type: pypi
  storage: default
  permissions:
    olenagerasimova:
     - upload
    "*":
     - download

The type mapping in the configuration sets the repository type. In this example, the Python repository is configured with the default Artipie Central storage.

The storage mapping defines where all of the repository packages are stored. This can be any file system or S3 storage compatible location. Artipie Central has a preconfigured default storage that can be used for tests by anyone.

The permissions mapping allows uploads for the user olenagerasimova, and allows anyone to download any package.

To make sure this repository exists and works, open the index page in your browser. The packages list is displayed. If you've just created a new repository but have yet to upload a package, then the repository index page is blank.

Binary repository

You can store any kind of file in Artipie. The storage type is called file or binary, and I use this as storage for experimental data. I use this as input for Python visualizations. A file repository can be created in Artipie Central the same way as a Python repository. You give it a name, choose the type binary, and then click the Add button.

---
​repo:
  type: file
  storage: default
  permissions:
    olenagerasimova:
     - upload
      - download
    "*":
     - download

The settings are basically the same as for Python. Only the repository type differs. The binary repository, in this example, is called data. It contains three text files with some numbers:

​6
3.5
5
4
4.5
3
2.7
5
6
3
1.2
3.2
6

The other two files take the same form (only the numbers are different.) To see the files yourself, open the links one, two, and three in your browser and download the files, or you can perform a GET request using httpie:

​httpie -a https://central.artipie.com/olenagerasimova/data/y1.dat > ./data/y1.da

These files were uploaded to the Artipie Central data repository with PUT requests:

​httpie -a olenagerasimova:*** PUT https://central.artipie.com/olenagerasimova/data/y1.dat @data/y1.dat

httpie -a olenagerasimova:*** PUT https://central.artipie.com/olenagerasimova/data/y2.dat @data/y2.dat

httpie -a olenagerasimova:*** PUT https://central.artipie.com/olenagerasimova/data/y3.dat @data/y3.dat

As this binary repository API is very simple (HTTP PUT and GET requests), it's easy to write a piece of code in any language to upload and download the required files.

More Python resources What is an IDE? Cheat sheet: Python 3.7 for beginners Top Python GUI frameworks Download: 7 essential PyPI libraries Red Hat Developers Latest Python articles Python project

The source code of an example Python project is available from my GitHub repository. The main idea of the example is to download three data files from Artipie Central, read the numbers into arrays, and use these arrays to draw a plot. Use pip to install the example package and run it:

​$ python3 -m pip install --index-url \
https://central.artipie.com/olenagerasimova/pypi/ \
pypiexample
$ python3 -m pypiexample

By setting the --index-url to the Artipie Central Python repository, pip downloads the packages from it rather than the PyPi repository that serves as the usual default. After running the commands, a polar plot with three curves, a visualization of the data files is displayed.

To publish the package to the Artipie Central repository, build it with and use twine to upload it:

commandline
$ python setup.py sdist bdist_wheel

$ twine upload --repository-url \
https://central.artipie.com/olenagerasimova/pypi
-u olenagerasimova -p *** dist/*

That's how easy it is to set up a files repositories in Artipie Central, create a sample Python project, publish, and install it. You don't have to use Artipie Central, though. Artipie can be self-hosted, so you can run a repository on your own local network.

Run Artipie as a container

Running Artipie as a container makes setup as easy as installing either Podman or Docker. Assuming you have one of these installed, open a terminal:

​$ podman run -it -p 8080:8080 -p 8086:8086 artipie/artipie:latest

This starts a new container running the latest Artipie version. It also maps two ports. Your repositories are served on port 8080. The Artipie Rest API and Swagger documentation are provided on port 8086. A new image generates a default configuration, printing a list of running repositories, test credentials, and a link to the Swagger documentation to your console.

You can also use the Artipie Rest API to see existing repositories:

  1. Go to the Swagger documentation page at http://localhost:8086/api/index-org.html.

  2. In the Select a definition list, choose Auth token

  3. Generate and copy the authentication token for the user artipie with the password artipie

  4. Switch to the Repositories definition and click the Authorize button, and then paste in the token

Image by:

(Seth Kenlon, CC BY-SA 4.0)

 

Perform a GET request for /api/v1/repository/list. In response, you receive a JSON list with three default repositories:

 

​[ "artipie/my-bin", "artipie/my-docker", "artipie/my-maven" ]

The Python repository isn't included in the default configuration. You can correct that by performing a PUT request to /api/v1/repository/{user}/{repo} from the  Swagger interface. In this case, user is the name of the default user (artipie) and repo is the name of the new repository. You can call your new Python repository my-pypi. Here's an example request body, containing a JSON object with the repository settings:

​{ "repo": { "type": "pypi", "storage": "default", "permissions": { "*": [ "download" ], "artipie": [ "upload" ] } } }

All the JSON fields are the same as when you create a repository in the dashboard in YAML format. The type of our repository is pypi, the default storage is used, and anyone can download but only the user artipie can upload.

Make a GET request to /api/v1/repository/list again to make sure your repository was created. Now, you have four repositories:

​[ "artipie/my-bin", "artipie/my-docker", "artipie/my-maven", "artipie/my-pypi" ]

You've created your own Artipie installation, containing several repositories! The Artipie image can run both on a personal computer or on a remote server inside a private network. You can use it to exchange packages within a company, group, or university. It's an easy way to set up your own software services, and it's not just for Python. Take some time to explore Artipie and see what it can make possible for you.

Artipie is an open source self-hosted software repository manager that can be used for much more than just Python.

Image by:

WOCinTech Chat. Modified by Opensource.com. CC BY-SA 4.0

Python Containers What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Pages