Open harshguptaserver opened 3 weeks ago
See https://github.com/EpicWink/proxpi/commit/f4f87a677a3ca68c67907067d80adf84f6485f2b and https://github.com/EpicWink/proxpi/commit/3cc4b78c18f8d165f206d92e9b192f4f47dd5ee0 (set environment variable PROXPI_LOGGING_LEVEL=DEBUG
with latest repo check-out)
Nice! Thank you @EpicWink
Got it working :-) Build/run commands (for anyone who stumbles here and wants to replicate):
git clone https://github.com/EpicWink/proxpi.git
cd proxpi/
docker build . -t proxypi:latest
docker run -p 5000:5000 -e PROXPI_LOGGING_LEVEL=DEBUG proxypi:latest
command on client:
python3 -m pip install --index-url=http://192.168.88.70:5000/index/ --trusted-host 192.168.88.70 flask
service logs:
2024-11-13 14:42:31 [ DEBUG] proxpi._cache: Index 'https://pypi.org/simple/' cache stats:
flask: hits: 2, misses: 1
werkzeug: hits: 2, misses: 1
jinja2: hits: 2, misses: 1
itsdangerous: hits: 2, misses: 1
click: hits: 2, misses: 1
blinker: hits: 2, misses: 1
markupsafe: hits: 2, misses: 1
pip: hits: 0, misses: 1
2024-11-13 14:42:31 [ DEBUG] proxpi._cache: Files cache stats:
files-pythonhosted-org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/52/24/ab44c871b0f07f491e5d2ad12c9bd7358e527510618cb1b803a88e986db1/werkzeug-3.1.3-py3-none-any.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/22/35/137da042dfb4720b638d2937c38a9c2df83fe32d20e8c8f3185dbfef05f7/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata: hits: 1, misses: 1
files-pythonhosted-org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl: hits: 1, misses: 1
files-pythonhosted-org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl: hits: 1, misses: 1
files-pythonhosted-org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl: hits: 1, misses: 1
files-pythonhosted-org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl: hits: 1, misses: 1
files-pythonhosted-org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl: hits: 1, misses: 1
files-pythonhosted-org/packages/52/24/ab44c871b0f07f491e5d2ad12c9bd7358e527510618cb1b803a88e986db1/werkzeug-3.1.3-py3-none-any.whl: hits: 1, misses: 1
files-pythonhosted-org/packages/22/35/137da042dfb4720b638d2937c38a9c2df83fe32d20e8c8f3185dbfef05f7/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl: hits: 1, misses: 1
if possible, It would be great if we can have an endpoint to make a call and check the stats like : acng-report.html in apt-cacher-ng
Thank you for the quick response and help.
aim: using EpicWink/proxpi as a cache server for pip installs during container builds in the complete internal network
I would like to kindly request for a url/endpoint/feature that confirms that caching is indeed occurring i.e. we can see the stats that tell us how many upstream calls were made or how much data was downloaded and how much as saved by reply from cache
issue: cannot see if the cache is really working
Current behaviour
Looking at say lines with "flask-3.0.3-py3-none-any" , i tried running following on 3 computers:
it worked well, but i am not sure if it is actually saving me data by serving me cached copy or if it is again proxying the request.