Skip to content

Commit

Permalink
fix: remove download buttons from UI (#446)
Browse files Browse the repository at this point in the history
* fix: remove download buttons from ui

Also removing references to sregistry global client

Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch authored Jul 2, 2024
1 parent 675fb4d commit ae1c365
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 156 deletions.
2 changes: 1 addition & 1 deletion .github/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pre-commit
black
black==23.3.0
isort
flake8
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v4
- name: Check for typos in docs
uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Tributors Update

# Important! Update to release https://github.com/con/tributors
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
echo "PULL_REQUEST_BODY=Tributors update automated pull request." >> $GITHUB_ENV
- name: Open Pull Request
uses: vsoch/pull-request-action@1.0.15
uses: vsoch/pull-request-action@master
if: ${{ env.OPEN_PULL_REQUEST == '1' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ represented by the pull requests that fixed them. Critical items to know are:


## [master](https://github.com/singularityhub/sregistry/tree/master) (master)
- remove button uploads, deprecated (2.1.2)
- setup LIST_DEFAULTS for list settings. (2.1.1)
- update to use Django 4.2 (2.1.0)
- consolidate config into one file with environment (2.0.0)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.1
2.1.2
145 changes: 0 additions & 145 deletions docs/_docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,151 +194,6 @@ Of course, do this at your own risk! That is a *CHONKER*!
<hr>
<br>
# Singularity Registry Client
Singularity Registry Global Client, or [sregistry-cli](https://github.com/singularityhub/sregistry-cli),
is a general client to interact with Singularity images at remote endpoints, and it provides
such an endpoint for Singularity Registry Server. We will provide
basic instructions here, and for the full documentation, please see the [getting started guide here](https://singularityhub.github.io/sregistry-cli/client-registry). Note that you will need to [export your credentials](https://singularityhub.github.io/sregistry/credentials) in order to have authenticated interaction with sregistry.
## Install
### sregistry Installation
`sregistry` is the client for Singularity Registry server. To install, you can do the following:
```bash
git clone https://github.com/singularityhub/sregistry-cli
cd sregistry-cli
python setup.py install
```
To check your install, run this command to make sure the `sregistry` client is found.
which sregistry
### Container Install
We have provided a Singularity build definition for you, for which you can use to build a container that serves as the sregistry client (and this will likely be provided on Singularity Hub so you don't even need to do that.) To build, do the following:
```bash
cd sregistry/
# Singularity 2.4 and up
sudo singularity build sregistry Singularity
# For Singularity earlier than 2.4 (deprecated)
singularity create --size 2000 sregistry
sudo singularity bootstrap sregistry Singularity
```
If you install via this option, you will want to make sure the container itself is somewhere on your path, with appropriate permissions for who you want to be able to use it.
## Commands
This brief tutorial assumes that you have [Singularity installed](https://singularityware.github.io/install-linux).
### Pull
Not shown in the demo above is the pull command, but it does the same thing as the singularity pull.
```bash
sregistry pull banana/pudding:milkshake
Progress |===================================| 100.0%
Success! banana-pudding-milkshake.img
```
This is useful so that you can (locally from your registry) pull an image without needing to specify the registry url. It's also important because registry support will only be added to Singularity when the entire suite of compoenents are ready to go!
### Push
If you don't have an image handy, you can pull one:
```bash
singularity pull docker://busybox
```
And then a push to your registry looks like this:
```bash
$ sregistry push -U busybox_latest.sif --name dinosaur/avocado --tag delicious
$ sregistry push -U busybox_latest.sif --name meowmeow/avocado --tag nomnomnom
$ sregistry push -U busybox_latest.sif --name dinosaur/avocado --tag whatinthe
```
If you don't specify a tag, `latest` is used. If you have authentication issues,
remember that you need to [export a token](https://singularityhub.github.io/sregistry/credentials) for your user, and ensure that the user is either an admin/manager, or
that you have set the `USER_COLLECTIONS` variable to true. You can read [more about roles here](https://singularityhub.github.io/sregistry/setup-roles), and [more about teams](https://singularityhub.github.io/sregistry/setup-teams) to manage groups of people.
### List
List is a general command that will show a specific container, a specific collection, optionally with a tag. Examples are provided below:
```bash
# All collections
sregistry list
# A particular collection
sregistry list dinosaur
# A particular container name across collections
sregistry list /avocado
# A named container, no tag
sregistry list dinosaur/avocado
# A named container, with tag
sregistry list dinosaur/avocado:delicious
```
In addition to listing containers, `sregistry` can show you metadata! It does this by issuing an inspect command at upload time, so that no processing is needed on the server side. Singularity Registry is a Dockerized application, so it would require --privileged mode, which is a bad idea. Anyway, we can look at environment (`--env/-e`), runscript (`--runscript/-r`), tests (`--test/-t`), or `Singularity` definition recipe (`--deffile/-d`):
```bash
# Show me environment
sregistry list dinosaur/tacos:delicious --env
# Add runscript
sregistry list dinosaur/tacos:delicious --e --r
# Definition recipe (Singularity) and test
sregistry list dinosaur/tacos:delicious --d --t
# All of them
sregistry list dinosaur/tacos:delicious --e --r --d --t
```
### Delete
Delete requires the same authentication as push, and you will need to confirm with `yes/no`
```bash
sregistry delete dinosaur/tacos:delicious
sregistry list
```
if you want to force it, add `--force`
```bash
sregistry delete dinosaur/tacos:delicious --force
```
### Labels
Labels are important, and so they are represented as objects in the database for index, query, etc. Akin to containers, we can list and search:
```bash
# All labels
sregistry labels
# A specific key
sregistry labels --key maintainer
# A specific value
sregistry labels --value vanessasaur
# A specific key and value
sregistry labels --key maintainer --value vanessasaur
```
# Curl
Expand Down
1 change: 0 additions & 1 deletion shub/apps/main/templates/collections/view_collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ <h3 class="title">{{ collection.name }} <span class="small">collection</span></h
{% if container.metadata.builder.name == "google_build" %}href="{% url 'delete_google_container' container.id %}">
{% else %} href="{% url 'delete_container' container.id %}">{% endif %}</a>
{% endif %}<!-- container was pushed directly -->
{% if container.get_storage and request.user.is_authenticated %}<a href="{% url 'library_manual_download' container.get_uri %}" target="_blank"><button class="btn-sm btn btn-control btn-light"><i class="fa fa-download"></i></button></a>{% endif %}
</td>

<td><a href="{% url 'container_details' container.id %}">
Expand Down
4 changes: 0 additions & 4 deletions shub/apps/main/templates/containers/container_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ <h3>
{% endif %}

{% if container.image %}
<a href="{% url 'download_container' container.id container.collection.secret %}"
target="_blank">
<button class="btn btn-sm btn-default">Download</button>
</a>
{% if edit_permission %}
<a id="share_container"
class="btn btn-default btn-sm"
Expand Down

0 comments on commit ae1c365

Please sign in to comment.