Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/project-codeflare/pypi-cache
Simple implementation of PyPI cache server for offline use
https://github.com/project-codeflare/pypi-cache
Last synced: about 1 month ago
JSON representation
Simple implementation of PyPI cache server for offline use
- Host: GitHub
- URL: https://github.com/project-codeflare/pypi-cache
- Owner: project-codeflare
- License: apache-2.0
- Created: 2023-12-04T16:15:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-10T14:35:24.000Z (about 1 year ago)
- Last Synced: 2023-12-10T15:34:22.601Z (about 1 year ago)
- Language: Dockerfile
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Container With Devpi Server
A Dockerfile image based on [python:3-alpine3.9](https://hub.docker.com/layers/library/python/3.9-alpine) that runs
a [devpi](http://doc.devpi.net) server (*a PyPi Cache*).To install required packages, and to store required package cache on devpi server's index_url (in order to use packages in offline air-gapped environment) :
- Update `requirements.txt` file with the list of required package dependencies before image build. These listed packages in `requirements.txt` will be installed as a part of image build.## Usage
After clonning repository, change current directory to devpi folder :
```bash
cd devpi
```
Build an image using Dockerfile present in current working directory
```bash
podman build -t .
```
Alternatively you can specify Python base image, used as environment detected by pip to pull dependencies for, by providing build parameter `PYTHON_IMAGE`.
```bash
podman build -t --build-arg PYTHON_IMAGE=pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime .
```Run container instance using image created above by port forwarding container port `3141` to container host's port `3141`
```bash
podman run -it --rm -p 3141:3141 --name devpi localhost/```
### pip
Use a configuration similar to this in your `~/.pip/pip.conf`:
```ini
[global]
index-url = http:///root/pypi/+simple/
```### setuptools
Use a configuration similar to this in your `~/.pydistutils.cfg`:
```ini
[easy_install]
index_url = http:///root/pypi/+simple/
```
In case, to run devpi-server on localhost system : `` ~ `localhost`