Skip to content

Commit

Permalink
IHP-32 Update dependencies (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisNovac authored Sep 28, 2024
1 parent 827aea2 commit e2d8659
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ trait KafkaJsonDeserializer {
decodeByteArray[T](bytes) match {
case Left(value) =>
KafkaJsonDecodingError(
s"Can't decode json kafka message: ${value.getMessage}. Original message: $bytes"
s"Can't decode json kafka message: ${value.getMessage}. Original message: ${new String(bytes)}"
)
.raiseError[F, T]
case Right(value) => value.pure[F]
Expand Down
25 changes: 10 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ services:

kafka:
container_name: kafka
image: bitnami/kafka:3.6.1
image: bitnami/kafka:3.8
ports:
- "9094:9094"
environment:
Expand All @@ -99,7 +99,7 @@ services:

minio:
container_name: minio
image: quay.io/minio/minio:RELEASE.2024-01-31T20-20-33Z
image: quay.io/minio/minio:RELEASE.2024-09-13T20-26-02Z
command: server --console-address ":9001" /data
ports:
- "9000:9000"
Expand All @@ -112,7 +112,7 @@ services:

postgres:
container_name: postgres
image: postgres:16-alpine3.18
image: postgres:16.4-alpine3.20
volumes:
- db-data:/var/lib/postgresql/data
environment:
Expand All @@ -128,23 +128,18 @@ services:
retries: 3
command: [ "postgres", "-c", "log_statement=all" ]

image-hosting-storage:
container_name: image-hosting-storage
image: ghcr.io/baklanov-soft/image-hosting-storage
image-hosting-webapi:
container_name: image-hosting-webapi
image: image-hosting-storage-webapi
environment:
Logging__LogLevel__Default: Information
Logging__LogLevel__Microsoft.AspNetCore: Warning
Logging__LogLevel__Microsoft.EntityFrameworkCore: Warning
Minio__Endpoint: minio:9000
Minio__AccessKey: minioadmin
Minio__SecretKey: minioadmin
Minio__Secure: false
ConnectionStrings__ImageHosting: "Host=postgres;Port=5432;Database=image_hosting;Username=image_hosting;Password=P@ssw0rd;Include Error Detail=true"
ASPNETCORE_ENVIRONMENT: Development
Kafka__Producer__BootstrapServers: kafka:9092
Kafka__Producer__ClientId: image-hosting-storage
Kafka__Producer__CompressionType: gzip
Kafka__NewImageTopic: new-images.v1
Kafka__BootstrapServers__0: kafka:9092
Kafka__NewImagesProducer__TopicName: new-images.v1
ports:
- "8080:8080"
depends_on:
Expand All @@ -155,7 +150,7 @@ services:

kafka-init-new-images:
container_name: kafka-init-new-images
image: bitnami/kafka:3.6.1
image: bitnami/kafka:3.8
depends_on:
- kafka
entrypoint: "kafka-topics.sh"
Expand All @@ -169,7 +164,7 @@ services:

kafka-init-categories:
container_name: kafka-init-categories
image: bitnami/kafka:3.6.1
image: bitnami/kafka:3.8
depends_on:
- kafka
entrypoint: "kafka-topics.sh"
Expand Down
38 changes: 12 additions & 26 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,38 @@ import sbt.*
object Dependencies {

private object Versions {
val apispec = "0.7.4"
val cats = "2.12.0"
val catsEffect = "3.5.4"
val circe = "0.14.10"

val cats = "2.10.0"
val catsEffect = "3.5.3"
val circe = "0.14.6"
val djl = "0.30.0"

val djl = "0.26.0"
val enumeratum = "1.7.4"

val enumeratum = "1.7.3"
val fs2 = "3.11.0"
val fs2Kafka = "3.5.1"

val fs2 = "3.9.4"
val fs2Kafka = "3.3.1"
val logback = "1.5.8"
val log4cats = "2.7.0"

val logback = "1.4.14"
val log4cats = "2.6.0"

val minioClient = "8.5.7"
val minioClient = "8.5.12"

val newtype = "0.4.4"

val pureconfig = "0.17.5"
val pureconfig = "0.17.7"

val imgscalr = "4.2"

/* testing */

val scalatest = "3.2.17"
val weaver = "0.8.4"

val scalatest = "3.2.19"
}

val plugins = Seq(
("org.typelevel" %% "kind-projector" % "0.13.2").cross(CrossVersion.full),
"com.olegpy" %% "better-monadic-for" % "0.3.1"
).map(compilerPlugin)

val apispec = "com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % Versions.apispec

val cats = "org.typelevel" %% "cats-core" % Versions.cats
val catsEffect = "org.typelevel" %% "cats-effect" % Versions.catsEffect

Expand All @@ -53,9 +47,6 @@ object Dependencies {

val djl = Seq(
"ai.djl" % "api" % Versions.djl,
// mxnet is used in object detection for embedded vgg16
"ai.djl.mxnet" % "mxnet-model-zoo" % Versions.djl,
"ai.djl.mxnet" % "mxnet-engine" % Versions.djl,
// pytorch for nsfw detection
"ai.djl.pytorch" % "pytorch-engine" % Versions.djl,
"ai.djl.pytorch" % "pytorch-model-zoo" % Versions.djl
Expand Down Expand Up @@ -91,11 +82,6 @@ object Dependencies {

object Testing {
val scalatest = "org.scalatest" %% "scalatest" % Versions.scalatest % Test

val weaver = Seq(
"com.disneystreaming" %% "weaver-core" % Versions.weaver % Test,
"com.disneystreaming" %% "weaver-cats" % Versions.weaver % Test
)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,8 @@ trait ObjectDetection[F[_]] {
object ObjectDetection {

private object Engines {

// mx net has a lot of included models so it's better to use in detection
object MxNet {
val name = "MXNet"

object Models {
val darknet53 = "darknet53"
val mobileNet = "mobilenet1.0"
val resnet50 = "resnet50"
val vgg16 = "vgg16"
}
}

object PyTorch {
val name = "MXNet"
val name = "PyTorch"

object Models {
val resnet50 = "resnet50"
Expand Down

0 comments on commit e2d8659

Please sign in to comment.