Compare commits

..

1 commit

Author SHA1 Message Date
renovate[bot]
04f1121f3d
chore(deps): update machine-learning 2023-12-06 20:23:41 +00:00
6 changed files with 22 additions and 34 deletions

View file

@ -1,4 +1,4 @@
FROM python:3.11-bookworm@sha256:ba7a7ac30c38e119c4304f98ef0e188f90f4f67a958bb6899da9defb99bfb471 as builder FROM python:3.12-bookworm@sha256:5eba34eb667213abb09a4c470365180d5706076f76945e49b963ac15d428a684 as builder
ENV PYTHONDONTWRITEBYTECODE=1 \ ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \ PYTHONUNBUFFERED=1 \
@ -13,7 +13,7 @@ ENV VIRTUAL_ENV="/opt/venv" PATH="/opt/venv/bin:${PATH}"
COPY poetry.lock pyproject.toml ./ COPY poetry.lock pyproject.toml ./
RUN poetry install --sync --no-interaction --no-ansi --no-root --only main RUN poetry install --sync --no-interaction --no-ansi --no-root --only main
FROM python:3.11-slim-bookworm@sha256:cc758519481092eb5a4a5ab0c1b303e288880d59afc601958d19e95b300bc86b FROM python:3.12-slim-bookworm@sha256:19a6235339a74eca01227b03629f63b6f5020abc21142436eced6ec3a9839a76
RUN apt-get update && apt-get install -y --no-install-recommends tini libmimalloc2.0 && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y --no-install-recommends tini libmimalloc2.0 && rm -rf /var/lib/apt/lists/*

View file

@ -7,7 +7,7 @@ readme = "README.md"
packages = [{include = "app"}] packages = [{include = "app"}]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "~3.11" python = "~3.12.0"
torch = [ torch = [
{markers = "platform_machine == 'arm64' or platform_machine == 'aarch64'", version = "=2.1.0", source = "pypi"}, {markers = "platform_machine == 'arm64' or platform_machine == 'aarch64'", version = "=2.1.0", source = "pypi"},
{markers = "platform_machine == 'amd64' or platform_machine == 'x86_64'", version = "=2.1.0", source = "pytorch-cpu"} {markers = "platform_machine == 'amd64' or platform_machine == 'x86_64'", version = "=2.1.0", source = "pytorch-cpu"}
@ -17,8 +17,8 @@ onnxruntime = "^1.15.0"
insightface = "^0.7.3" insightface = "^0.7.3"
opencv-python-headless = "^4.7.0.72" opencv-python-headless = "^4.7.0.72"
pillow = "^9.5.0" pillow = "^9.5.0"
fastapi = "^0.95.2" fastapi = "^0.104.0"
uvicorn = {extras = ["standard"], version = "^0.22.0"} uvicorn = {extras = ["standard"], version = "^0.24.0"}
pydantic = "^1.10.8" pydantic = "^1.10.8"
aiocache = "^0.12.1" aiocache = "^0.12.1"
optimum = "^1.9.1" optimum = "^1.9.1"
@ -27,7 +27,7 @@ ftfy = "^6.1.1"
setuptools = "^68.0.0" setuptools = "^68.0.0"
python-multipart = "^0.0.6" python-multipart = "^0.0.6"
orjson = "^3.9.5" orjson = "^3.9.5"
safetensors = "0.3.2" safetensors = "0.4.1"
gunicorn = "^21.1.0" gunicorn = "^21.1.0"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
@ -35,10 +35,10 @@ mypy = "^1.3.0"
black = "^23.3.0" black = "^23.3.0"
pytest = "^7.3.1" pytest = "^7.3.1"
locust = "^2.15.1" locust = "^2.15.1"
httpx = "^0.24.1" httpx = "^0.25.0"
pytest-asyncio = "^0.21.0" pytest-asyncio = "^0.21.0"
pytest-cov = "^4.1.0" pytest-cov = "^4.1.0"
ruff = "^0.0.272" ruff = "^0.1.0"
pytest-mock = "^3.11.1" pytest-mock = "^3.11.1"
[[tool.poetry.source]] [[tool.poetry.source]]

View file

@ -86,14 +86,11 @@ class _DateTimePicker extends HookWidget {
final timeZones = useMemoized(() => getAllTimeZones(), const []); final timeZones = useMemoized(() => getAllTimeZones(), const []);
void pickDate() async { void pickDate() async {
final now = DateTime.now();
// Handles cases where the date from the asset is far off in the future
final initialDate = date.value.isAfter(now) ? now : date.value;
final newDate = await showDatePicker( final newDate = await showDatePicker(
context: context, context: context,
initialDate: initialDate, initialDate: date.value,
firstDate: DateTime(1800), firstDate: DateTime(1800),
lastDate: now, lastDate: DateTime.now(),
); );
if (newDate == null) { if (newDate == null) {
return; return;

View file

@ -336,18 +336,14 @@ export class AssetService {
res.set('Cache-Control', 'private, max-age=86400, no-transform'); res.set('Cache-Control', 'private, max-age=86400, no-transform');
res.header('Content-Type', mimeTypes.lookup(filepath)); res.header('Content-Type', mimeTypes.lookup(filepath));
return new Promise((resolve, reject) => { res.sendFile(filepath, options, (error: Error) => {
res.sendFile(filepath, options, (error: Error) => { if (!error) {
if (!error) { return;
resolve(); }
return;
}
if (error.message !== 'Request aborted') { if (error.message !== 'Request aborted') {
this.logger.error(`Unable to send file: ${error.name}`, error.stack); this.logger.error(`Unable to send file: ${error.name}`, error.stack);
} }
reject(error);
});
}); });
} }

View file

@ -205,13 +205,12 @@
<section class="px-4 py-4 text-sm"> <section class="px-4 py-4 text-sm">
<div class="flex h-10 w-full items-center justify-between"> <div class="flex h-10 w-full items-center justify-between">
<h2>PEOPLE</h2> <h2>PEOPLE</h2>
<div class="flex gap-2 items-center"> <div class="flex gap-2">
{#if people.some((person) => person.isHidden)} {#if people.some((person) => person.isHidden)}
<CircleIconButton <CircleIconButton
title="Show hidden people" title="Show hidden people"
icon={showingHiddenPeople ? mdiEyeOff : mdiEye} icon={showingHiddenPeople ? mdiEyeOff : mdiEye}
padding="1" padding="1"
buttonSize="32"
on:click={() => (showingHiddenPeople = !showingHiddenPeople)} on:click={() => (showingHiddenPeople = !showingHiddenPeople)}
/> />
{/if} {/if}
@ -220,7 +219,6 @@
icon={mdiPencil} icon={mdiPencil}
padding="1" padding="1"
size="20" size="20"
buttonSize="32"
on:click={() => (showEditFaces = true)} on:click={() => (showEditFaces = true)}
/> />
</div> </div>
@ -339,7 +337,7 @@
</div> </div>
{#if isOwner} {#if isOwner}
<button class="focus:outline-none p-1"> <button class="focus:outline-none">
<Icon path={mdiPencil} size="20" /> <Icon path={mdiPencil} size="20" />
</button> </button>
{/if} {/if}
@ -351,7 +349,7 @@
<Icon path={mdiCalendar} size="24" /> <Icon path={mdiCalendar} size="24" />
</div> </div>
</div> </div>
<button class="focus:outline-none p-1"> <button class="focus:outline-none">
<Icon path={mdiPencil} size="20" /> <Icon path={mdiPencil} size="20" />
</button> </button>
</div> </div>
@ -509,7 +507,7 @@
</div> </div>
{:else if !asset.exifInfo?.city && !asset.isReadOnly && $user && asset.ownerId === $user.id} {:else if !asset.exifInfo?.city && !asset.isReadOnly && $user && asset.ownerId === $user.id}
<div <div
class="flex justify-between place-items-start gap-4 py-4 rounded-lg hover:dark:text-immich-dark-primary hover:text-immich-primary" class="flex justify-between place-items-start gap-4 py-4 rounded-lg pr-2 hover:dark:text-immich-dark-primary hover:text-immich-primary"
on:click={() => (isShowChangeLocation = true)} on:click={() => (isShowChangeLocation = true)}
on:keydown={(event) => event.key === 'Enter' && (isShowChangeLocation = true)} on:keydown={(event) => event.key === 'Enter' && (isShowChangeLocation = true)}
tabindex="0" tabindex="0"
@ -523,7 +521,7 @@
<p>Add a location</p> <p>Add a location</p>
</div> </div>
<div class="focus:outline-none p-1"> <div class="focus:outline-none">
<Icon path={mdiPencil} size="20" /> <Icon path={mdiPencil} size="20" />
</div> </div>
</div> </div>

View file

@ -11,13 +11,10 @@
export let forceDark = false; export let forceDark = false;
export let hideMobile = false; export let hideMobile = false;
export let iconColor = 'currentColor'; export let iconColor = 'currentColor';
export let buttonSize: string | undefined = undefined;
</script> </script>
<button <button
{title} {title}
style:width={buttonSize ? buttonSize + 'px' : ''}
style:height={buttonSize ? buttonSize + 'px' : ''}
style:background-color={backgroundColor} style:background-color={backgroundColor}
style:--immich-icon-button-hover-color={hoverColor} style:--immich-icon-button-hover-color={hoverColor}
class:dark:text-immich-dark-fg={!forceDark} class:dark:text-immich-dark-fg={!forceDark}