Skip to content

Commit 0523f60

Browse files
committed
v1.0.0 (3)
1 parent 83df69a commit 0523f60

35 files changed

+24
-4623
lines changed

.run/upscaler_example.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<env name="APP_PORT" value="10050" />
99
<env name="APP_SECRET" value="12345" />
1010
<env name="APP_VERSION" value="1.0.0" />
11-
<env name="NEXTCLOUD_URL" value="http://nextcloud.local/" />
11+
<env name="NEXTCLOUD_URL" value="http://stable27.local/index.php" />
1212
<env name="PYTHONUNBUFFERED" value="1" />
1313
</envs>
1414
<option name="SDK_HOME" value="$PROJECT_DIR$/venv/bin/python" />

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ ADD /src/ /app/
55

66
RUN apt-get update && apt-get install -y libgl1 libgl1-mesa-glx libglib2.0-0
77

8-
RUN \
9-
python3 -m pip install /app/gfpgan_src/. && rm -rf ~/.cache
10-
118
RUN \
129
python3 -m pip install -r requirements.txt && rm -rf ~/.cache && rm requirements.txt
1310

Makefile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,25 @@ help:
99
@echo " "
1010
@echo " build-push build image and upload to ghcr.io"
1111
@echo " "
12-
@echo " deploy deploy example to registered 'docker_dev'"
12+
@echo " deploy28 deploy example to registered 'docker_dev' for Nextcloud 28"
13+
@echo " deploy27 deploy example to registered 'docker_dev' for Nextcloud 27"
1314
@echo " "
1415
@echo " run28 install UpScaler for Nextcloud 28"
1516
@echo " run27 install UpScaler for Nextcloud 27"
1617
@echo " "
1718
@echo " For development of this example use PyCharm run configurations. Development is always set for last Nextcloud."
1819
@echo " First run 'upscaler_example' and then 'make manual_register', after that you can use/debug/develop it and easy test."
1920
@echo " "
20-
@echo " manual_register perform registration of running 'upscaler_example' into 'manual_install' deploy daemon."
21+
@echo " manual_register28 perform registration of running 'upscaler_example' into 'manual_install' deploy daemon."
22+
@echo " manual_register27 perform registration of running 'upscaler_example' into 'manual_install' deploy daemon."
2123

2224
.PHONY: build-push
2325
build-push:
2426
docker login ghcr.io
2527
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/upscaler_example:1.0.0 --tag ghcr.io/cloud-py-api/upscaler_example:latest .
2628

27-
.PHONY: deploy
28-
deploy:
29+
.PHONY: deploy28
30+
deploy28:
2931
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister upscaler_example --silent || true
3032
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:deploy upscaler_example docker_dev \
3133
--info-xml https://raw.githubusercontent.com/cloud-py-api/upscaler_example/main/appinfo/info.xml
@@ -37,16 +39,29 @@ run28:
3739
-e --force-scopes \
3840
--info-xml https://raw.githubusercontent.com/cloud-py-api/upscaler_example/main/appinfo/info.xml
3941

42+
.PHONY: deploy27
43+
deploy27:
44+
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister upscaler_example --silent || true
45+
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:deploy upscaler_example docker_dev \
46+
--info-xml https://raw.githubusercontent.com/cloud-py-api/upscaler_example/main/appinfo/info.xml
47+
4048
.PHONY: run27
4149
run27:
4250
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister upscaler_example --silent || true
4351
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register upscaler_example docker_dev \
4452
-e --force-scopes \
4553
--info-xml https://raw.githubusercontent.com/cloud-py-api/upscaler_example/main/appinfo/info.xml
4654

47-
.PHONY: manual_register
48-
manual_register:
55+
.PHONY: manual_register28
56+
manual_register28:
4957
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:unregister upscaler_example --silent || true
5058
docker exec master-nextcloud-1 sudo -u www-data php occ app_api:app:register upscaler_example manual_install --json-info \
5159
"{\"appid\":\"upscaler_example\",\"name\":\"upscaler_example\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"host\":\"host.docker.internal\",\"port\":10050,\"scopes\":{\"required\":[\"FILES\", \"NOTIFICATIONS\"],\"optional\":[]},\"protocol\":\"http\",\"system_app\":0}" \
5260
-e --force-scopes
61+
62+
.PHONY: manual_register27
63+
manual_register27:
64+
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:unregister upscaler_example --silent || true
65+
docker exec master-stable27-1 sudo -u www-data php occ app_api:app:register upscaler_example manual_install --json-info \
66+
"{\"appid\":\"upscaler_example\",\"name\":\"upscaler_example\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"host\":\"host.docker.internal\",\"port\":10050,\"scopes\":{\"required\":[\"FILES\", \"NOTIFICATIONS\"],\"optional\":[]},\"protocol\":\"http\",\"system_app\":0}" \
67+
-e --force-scopes

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ httpx>=0.24.1
44
pydantic>=2.1.1
55
requests>=2.31
66
xmltodict>=0.13
7+
gfpgan>=1.3.1
File renamed without changes.

results/nc_team.jpg

-2.51 MB
Binary file not shown.

results/nc_team_restored.jpg

-3.36 MB
Binary file not shown.

results/nextcloud.jpg

126 KB
Loading

results/nextcloud_upscaled.png

582 KB
Loading

screenshots/upscaling.png

142 KB
Loading

0 commit comments

Comments
 (0)