As an addon developer, I want to do more knowledge sharing about best practices that have helped me over the years.
I’ve had to replicate and help users with countless Anki and AwesomeTTS / HyperTTS / Language tools issues over the years, whether it’s helping people with their decks / card templates, or reproducing bugs in my addons. One tool that really helped me is Kasm Workspaces: https://kasmweb.com/
It’s a platform you can use in the cloud or in a self-hosted manner. You can configure docker images with a fully functional Anki setup, and when you need a fresh Anki install to troubleshoot something, you can simply launch a disposable desktop accessible through your web browser.
It looks like this:
By just clicking on the “Anki - Full” icon, I’ve got a fully working Anki install (with a version of my choosing), with a copy of my deck. I can start playing around with the deck or the settings, and none of the changes are permanent, they will reset when the container is shutdown.
I can also upload other user’s decks when they require help with their setup.
When you install or sign up for Kasm Workspaces, you get access to Linux desktop environments which are ready to use, and you can add your own custom docker images to install Anki automatically. Here’s an example below:
# docker build -t anki-base:latest -f Dockerfile .
# instructions: https://kasmweb.com/docs/latest/how_to/building_images.html#basic-build
# to add the workspace to kasm:
# - workspace type: container
# - friendly name: Anki
# - description: Anki Flashcard Software
# - thumbnail url: https://m.media-amazon.com/images/I/41J1JZ4FYpL.png
# - categories: Education
FROM kasmweb/core-ubuntu-jammy:1.16.1
USER root
ENV HOME=/home/kasm-default-profile
ENV STARTUPDIR=/dockerstartup
ENV INST_SCRIPTS=$STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
# additional dependencies for anki
RUN apt-get update && \
apt-get install -y \
zstd \
rclone \
xdg-utils \
firefox \
mpv \
libxkbcommon-x11-0 \
libegl1 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxrender1 \
libxrandr2 \
libxtst6 \
libxi6 \
libasound2 \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxcb-shape0-dev \
fonts-arphic-ukai \
fonts-arphic-uming \
fonts-ipafont-mincho \
fonts-ipafont-gothic \
fonts-unfonts-core \
libxcb-cursor0 \
mousepad \
unzip \
rsync \
sqlite3
# install OBS studio
RUN apt install -y obs-studio
ENV ANKI_VERSION=25.02.5
ENV ANKI_FILEROOT=anki-${ANKI_VERSION}-linux-qt6
ENV ANKI_FILENAME=${ANKI_FILEROOT}.tar.zst
ENV ANKI_TEMP_DIR=/tmp
RUN cd ${ANKI_TEMP_DIR} && wget https://github.com/ankitects/anki/releases/download/${ANKI_VERSION}/${ANKI_FILENAME}
RUN cd ${ANKI_TEMP_DIR} && tar --use-compress-program=unzstd -xvf ${ANKI_TEMP_DIR}/${ANKI_FILENAME}
RUN cd ${ANKI_TEMP_DIR}/${ANKI_FILEROOT} && ./install.sh
RUN cp /usr/local/share/applications/anki.desktop $HOME/Desktop/ && chmod +x $HOME/Desktop/anki.desktop
# desktop icon for syncing anki addons
COPY sync-addons.desktop $HOME/Desktop/
RUN chmod +x $HOME/Desktop/anki.desktop
RUN mkdir $HOME/anki-addons-releases
# desktop icon for syncing anki decks
COPY sync-decks.desktop $HOME/Desktop/
# download anki deck
RUN mkdir -p $HOME/AnkiDecks/ && wget https://cloud-language-tools-storage.nyc3.digitaloceanspaces.com/collection.colpkg -O $HOME/AnkiDecks/collection-20240402.colpkg
# change desktop background
RUN wget https://res.cloudinary.com/photozzap/image/upload/v1594529672/ankireview_prod/backgrounds/abstract_future/yjdfbxopgneezbgqc1di.png \
-O /usr/share/backgrounds/bg_default.png
# rclone setup
RUN mkdir -p $HOME/.config/rclone
COPY rclone.conf $HOME/.config/rclone/rclone.conf