Update Dockerfile and Ruby files for improved dependency management and type safety

- Upgraded bundler version from 2.4.5 to 2.5.6 in Dockerfile for better compatibility.
- Updated gem versions for faiss and rails_live_reload to their latest versions.
- Modified Ruby files to enforce strict typing with Sorbet, enhancing type safety across various models and jobs.
- Added type signatures to methods in Inkbunny and FA domain models, ensuring better type checking and documentation.
- Improved job argument handling in Inkbunny jobs, including priority settings for deferred jobs.
- Refactored initialization logic in several models to ensure default states are set correctly.

These changes aim to enhance the overall stability and maintainability of the codebase.
This commit is contained in:
Dylan Knutson
2025-01-01 02:55:10 +00:00
parent 7339c1153c
commit ea4b36a1d8
26 changed files with 135 additions and 46 deletions

View File

@@ -9,13 +9,13 @@ RUN \
cmake
WORKDIR /usr/src/app
RUN gem install bundler -v '2.4.5'
RUN gem install bundler -v '2.5.6'
COPY gems gems
WORKDIR /usr/src/app/gems/xdiff-rb
RUN bundle install
RUN bundle _2.5.6_ install
RUN rake compile
WORKDIR /usr/src/app/gems/rb-bsdiff
RUN bundle install
RUN bundle _2.5.6_ install
RUN rake compile
# Primary image
@@ -34,9 +34,9 @@ RUN \
libblas-dev liblapack-dev
# preinstall gems that take a long time to install
RUN MAKE="make -j12" gem install bundler -v '2.4.6' --verbose
RUN MAKE="make -j12" gem install faiss -v '0.2.5' --verbose
RUN MAKE="make -j12" gem install rails_live_reload -v '0.3.4' --verbose
RUN MAKE="make -j12" gem install bundler -v '2.5.6' --verbose
RUN MAKE="make -j12" gem install faiss -v '0.3.2' --verbose
RUN MAKE="make -j12" gem install rails_live_reload -v '0.3.6' --verbose
RUN bundle config --global frozen 1
# set up nodejs 18.x deb repo
@@ -58,7 +58,7 @@ COPY --from=native-gems /usr/src/app/gems/rb-bsdiff /gems/rb-bsdiff
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
RUN bundle _2.5.6_ install
# install js dependencies
COPY package.json yarn.lock ./