commit 92748d87dc64aad476eac9d13140a2d1694fb407 Author: Arlind Sulejmani Date: Thu Jun 5 17:12:13 2025 +0200 Migrate image to new repo diff --git a/.gitea/workflows/image.yml b/.gitea/workflows/image.yml new file mode 100644 index 0000000..e1d0362 --- /dev/null +++ b/.gitea/workflows/image.yml @@ -0,0 +1,36 @@ +name: Build and Push Docker Image + +on: + workflow_dispatch: + +env: + IMAGE_NAME: arlind/skins + +jobs: + build_and_push: + name: Build and Push Docker Image + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Git LFS + run: sudo apt-get update && sudo apt-get install -y git-lfs + + - name: Pull Git LFS files + run: git lfs pull + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ secrets.CONTAINER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.TOKEN }} + + - name: Build and Push Docker image + run: | + docker build -t ${{ secrets.CONTAINER_REGISTRY }}/$IMAGE_NAME:latest . + docker push ${{ secrets.CONTAINER_REGISTRY }}/$IMAGE_NAME:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..775fc33 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,97 @@ +FROM ubuntu:25.10 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN echo "deb http://ubuntu.ethz.ch/ubuntu/ noble main restricted universe multiverse" > /etc/apt/sources.list && \ + echo "deb http://ubuntu.ethz.ch/ubuntu/ noble-updates main restricted universe multiverse" >> /etc/apt/sources.list && \ + echo "deb http://ubuntu.ethz.ch/ubuntu/ noble-security main restricted universe multiverse" >> /etc/apt/sources.list && \ + echo "deb http://ubuntu.ethz.ch/ubuntu/ noble-backports main restricted universe multiverse" >> /etc/apt/sources.list && \ + apt update + +RUN apt update && apt install -y \ + xvfb \ + libgtk-3-0 \ + unzip \ + xz-utils \ + wget \ + autoconf \ + pkg-config \ + build-essential \ + curl \ + libpng-dev \ + zip \ + git \ + git-lfs \ + jq \ + fonts-urw-base35 \ + libfreetype6-dev \ + libfontconfig1-dev \ + ghostscript \ + openssh-client \ + fonts-noto-color-emoji \ + fonts-dejavu-core \ + libxml2 \ + libxml2-dev \ + && fc-cache -f -v \ + && apt clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /app/danser/songs \ + /app/danser/settings \ + /app/danser/videos \ + /app/danser/screenshots + +RUN DAN_URL=$(curl -s https://api.github.com/repos/Wieku/danser-go/releases/latest \ + | jq -r '.assets[] | select(.name | endswith("linux.zip")) | .browser_download_url') && \ + wget -qO /tmp/danser.zip "$DAN_URL" && \ + unzip /tmp/danser.zip -d /app/danser && \ + chmod +x /app/danser/danser-cli && \ + rm -r /app/danser/ffmpeg + +RUN wget -qO- $(curl -s https://api.github.com/repos/BtbN/FFmpeg-Builds/releases/latest \ + | grep "browser_download_url.*linux64-gpl-shared.tar.xz" \ + | cut -d '"' -f 4) -O /tmp/ffmpeg.tar.xz && \ + tar -xvf /tmp/ffmpeg.tar.xz -C /tmp && \ + mv /tmp/ffmpeg-*/bin/* /usr/local/bin/ && \ + mv /tmp/ffmpeg-*/lib/* /usr/local/lib/ && \ + mv /tmp/ffmpeg-*/include/* /usr/local/include/ && \ + mkdir -p /app/danser/ffmpeg && \ + cp /usr/local/bin/ffmpeg /app/danser/ffmpeg/ && \ + cp /usr/local/bin/ffprobe /app/danser/ffmpeg/ && \ + cp /usr/local/bin/ffplay /app/danser/ffmpeg/ && \ + ldconfig + +RUN IMAGICK_URL=$(curl -s https://api.github.com/repos/ImageMagick/ImageMagick/releases/latest \ + | jq -r '.tarball_url') && \ + wget -qO- "$IMAGICK_URL" | tar xz && \ + cd ImageMagick-* && \ + ./configure --prefix=/usr/local \ + --with-bzlib=yes \ + --with-fontconfig=yes \ + --with-freetype=yes \ + --with-gslib=yes \ + --with-gvc=yes \ + --with-jpeg=yes \ + --with-jp2=yes \ + --with-png=yes \ + --with-tiff=yes \ + --with-xml=yes \ + --with-gs-font-dir=yes && \ + make -j$(nproc) && \ + make install && \ + ldconfig /usr/local/lib/ && \ + cd / && rm -rf ImageMagick-* + +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -y nodejs \ + && npm install -g npm@latest \ + && rm -rf /var/lib/apt/lists/* + +COPY src/297969n.osz /app/danser/songs/ + +RUN unzip /app/danser/songs/297969n.osz -d /app/danser/songs/297969n/ && \ + rm /app/danser/songs/297969n.osz + +COPY src/default.json /app/danser/settings/default.json + +WORKDIR /app/danser diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..41df415 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Arlind-dev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/297969n.osz b/src/297969n.osz new file mode 100644 index 0000000..069008c Binary files /dev/null and b/src/297969n.osz differ diff --git a/src/default.json b/src/default.json new file mode 100644 index 0000000..f1981cd --- /dev/null +++ b/src/default.json @@ -0,0 +1,683 @@ +{ + "General": { + "OsuSongsDir": "/app/danser/songs", + "OsuSkinsDir": "/workspace/arlind/skins/Skins", + "OsuReplaysDir": "/app/danser/replays", + "DiscordPresenceOn": false, + "UnpackOszFiles": true, + "VerboseImportLogs": false + }, + "Graphics": { + "Width": 1920, + "Height": 1080, + "WindowWidth": 1440, + "WindowHeight": 810, + "Fullscreen": true, + "VSync": false, + "FPSCap": 0, + "MSAA": 4, + "ShowFPS": true, + "Experimental": { + "UsePersistentBuffers": false + } + }, + "Audio": { + "GeneralVolume": 0.6, + "MusicVolume": 0.4, + "SampleVolume": 0.5, + "Offset": 0, + "OnlineOffset": false, + "HitsoundPositionMultiplier": 1, + "IgnoreBeatmapSamples": true, + "IgnoreBeatmapSampleVolume": false, + "PlayNightcoreSamples": true, + "BeatScale": 1.2, + "BeatUseTimingPoints": false, + "Linux/Unix": { + "BassPlaybackBufferLength": 100, + "BassDeviceBufferLength": 10, + "BassUpdatePeriod": 5, + "BassDeviceUpdatePeriod": 10 + } + }, + "Input": { + "LeftKey": "N", + "RightKey": "M", + "RestartKey": "K", + "SmokeKey": ",", + "ScreenshotKey": "F2", + "MouseButtonsDisabled": true, + "MouseHighPrecision": true, + "MouseSensitivity": 1 + }, + "Gameplay": { + "HitErrorMeter": { + "Show": false, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0, + "PointFadeOutTime": 10, + "ShowPositionalMisses": true, + "PositionalMissScale": 1.5, + "ShowUnstableRate": false, + "UnstableRateDecimals": 2, + "UnstableRateScale": 1.5, + "StaticUnstableRate": false, + "ScaleWithSpeed": false + }, + "AimErrorMeter": { + "Show": false, + "Scale": 1, + "Opacity": 1, + "XPosition": 1350, + "YPosition": 650, + "PointFadeOutTime": 10, + "DotScale": 1, + "Align": "Right", + "ShowUnstableRate": true, + "UnstableRateScale": 1, + "UnstableRateDecimals": 2, + "StaticUnstableRate": false, + "CapPositionalMisses": true, + "AngleNormalized": false + }, + "Score": { + "Show": true, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0, + "ProgressBar": "Pie", + "ShowGradeAlways": false, + "StaticScore": false, + "StaticAccuracy": false + }, + "HpBar": { + "Show": true, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0 + }, + "ComboCounter": { + "Show": true, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0, + "Static": false + }, + "PPCounter": { + "Show": false, + "Scale": 1, + "Opacity": 1, + "XPosition": 5, + "YPosition": 150, + "Color": { + "Hue": 0, + "Saturation": 0, + "Value": 1 + }, + "Decimals": 2, + "Align": "CentreLeft", + "ShowInResults": true, + "ShowPPComponents": false, + "Static": false + }, + "HitCounter": { + "Show": false, + "Scale": 1.1, + "Opacity": 1, + "XPosition": 10, + "YPosition": 195, + "Color300": { + "Hue": 0, + "Saturation": 0, + "Value": 1 + }, + "Color100": { + "Hue": 120, + "Saturation": 0.73, + "Value": 0.75 + }, + "Color50": { + "Hue": 43, + "Saturation": 0.71, + "Value": 0.7 + }, + "ColorMiss": { + "Hue": 0, + "Saturation": 0.71, + "Value": 1 + }, + "ColorSB": { + "Hue": 120, + "Saturation": 0.73, + "Value": 0.75 + }, + "Spacing": 48, + "FontScale": 1, + "Align": "Left", + "ValueAlign": "Left", + "Vertical": false, + "Show300": false, + "ShowSliderBreaks": true + }, + "StrainGraph": { + "Show": false, + "Opacity": 1, + "XPosition": 5, + "YPosition": 310, + "Align": "BottomLeft", + "Width": 200, + "Height": 70, + "BgColor": { + "Hue": 0, + "Saturation": 0, + "Value": 0.2 + }, + "FgColor": { + "Hue": 297, + "Saturation": 0.4, + "Value": 0.92 + }, + "Outline": { + "Show": false, + "Width": 2, + "InnerDarkness": 1, + "InnerOpacity": 1 + } + }, + "KeyOverlay": { + "Show": true, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0 + }, + "ScoreBoard": { + "Show": false, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0, + "Mode": "Normal", + "ModsOnly": false, + "AlignRight": false, + "HideOthers": true, + "ShowAvatars": true, + "ExplosionScale": 1 + }, + "Mods": { + "Show": true, + "Scale": 1, + "Opacity": 1, + "XOffset": 0, + "YOffset": 0, + "HideInReplays": false, + "FoldInReplays": false, + "ShowLazerMod": true, + "AdditionalSpacing": 0 + }, + "Boundaries": { + "Enabled": false, + "BorderThickness": 1, + "BorderFill": 1, + "BorderColor": { + "Hue": 0, + "Saturation": 0, + "Value": 1 + }, + "BorderOpacity": 1, + "BackgroundColor": { + "Hue": 0, + "Saturation": 1, + "Value": 0 + }, + "BackgroundOpacity": 0 + }, + "Underlay": { + "Path": "", + "AboveHpBar": false + }, + "SBFont": "", + "HUDFont": "", + "ShowResultsScreen": true, + "ResultsScreenTime": 5, + "ResultsUseLocalTimeZone": false, + "ShowWarningArrows": true, + "ShowHitLighting": false, + "FlashlightDim": 1, + "PlayUsername": "Arlind", + "IgnoreFailsInReplays": false, + "PPVersion": "latest", + "LazerClassicScore": false + }, + "Skin": { + "CurrentSkin": "- Jace", + "FallbackSkin": "default", + "UseColorsFromSkin": true, + "UseBeatmapColors": false, + "Cursor": { + "UseSkinCursor": true, + "Scale": 1, + "TrailScale": 1, + "ForceLongTrail": false, + "LongTrailLength": 2048, + "LongTrailDensity": 1 + } + }, + "Cursor": { + "TrailStyle": 1, + "Style23Speed": 0.18, + "Style4Shift": 0.5, + "Colors": { + "EnableRainbow": true, + "RainbowSpeed": 8, + "BaseColor": { + "Hue": 0, + "Saturation": 1, + "Value": 1 + }, + "EnableCustomHueOffset": false, + "HueOffset": 0, + "FlashToTheBeat": false, + "FlashAmplitude": 0 + }, + "EnableCustomTagColorOffset": true, + "TagColorOffset": -36, + "EnableTrailGlow": true, + "EnableCustomTrailGlowOffset": true, + "TrailGlowOffset": -36, + "ScaleToCS": false, + "CursorSize": 18, + "CursorExpand": false, + "ScaleToTheBeat": false, + "ShowCursorsOnBreaks": true, + "BounceOnEdges": false, + "TrailScale": 1, + "TrailEndScale": 0.4, + "TrailDensity": 0.5, + "TrailMaxLength": 2000, + "TrailRemoveSpeed": 1, + "GlowEndScale": 0.4, + "SmokeRemoveSpeed": 1, + "InnerLengthMult": 0.9, + "AdditiveBlending": true, + "CursorRipples": false, + "SmokeEnabled": true + }, + "Objects": { + "DrawApproachCircles": true, + "DrawComboNumbers": true, + "DrawFollowPoints": true, + "LoadSpinners": true, + "ScaleToTheBeat": false, + "StackEnabled": true, + "Sliders": { + "ForceSliderBallTexture": true, + "DrawEndCircles": true, + "DrawSliderFollowCircle": true, + "DrawScorePoints": true, + "SliderMerge": false, + "BorderWidth": 1, + "Distortions": { + "Enabled": true, + "ViewportSize": 0, + "UseCustomResolution": false, + "CustomResolutionX": 1920, + "CustomResolutionY": 1080 + }, + "Snaking": { + "In": false, + "Out": false, + "OutFadeInstant": true, + "DurationMultiplier": 0, + "FadeMultiplier": 0 + } + }, + "Colors": { + "MandalaTexturesTrigger": 5, + "MandalaTexturesAlpha": 0.3, + "Color": { + "EnableRainbow": false, + "RainbowSpeed": 8, + "BaseColor": { + "Hue": 0, + "Saturation": 1, + "Value": 1 + }, + "EnableCustomHueOffset": false, + "HueOffset": 0, + "FlashToTheBeat": false, + "FlashAmplitude": 100 + }, + "UseComboColors": false, + "ComboColors": [ + { + "Hue": 0, + "Saturation": 1, + "Value": 1 + } + ], + "UseSkinComboColors": false, + "UseBeatmapComboColors": false, + "Sliders": { + "WhiteScorePoints": true, + "ScorePointColorOffset": 0, + "SliderBallTint": false, + "Border": { + "UseHitCircleColor": false, + "Color": { + "EnableRainbow": false, + "RainbowSpeed": 8, + "BaseColor": { + "Hue": 0, + "Saturation": 0, + "Value": 1 + }, + "EnableCustomHueOffset": false, + "HueOffset": 0, + "FlashToTheBeat": false, + "FlashAmplitude": 100 + }, + "EnableCustomGradientOffset": true, + "CustomGradientOffset": 0 + }, + "Body": { + "UseHitCircleColor": true, + "Color": { + "EnableRainbow": false, + "RainbowSpeed": 8, + "BaseColor": { + "Hue": 0, + "Saturation": 1, + "Value": 0 + }, + "EnableCustomHueOffset": false, + "HueOffset": 0, + "FlashToTheBeat": false, + "FlashAmplitude": 100 + }, + "InnerOffset": -0.5, + "OuterOffset": -0.05, + "InnerAlpha": 0.8, + "OuterAlpha": 0.8 + } + } + } + }, + "Playfield": { + "DrawObjects": true, + "DrawCursors": true, + "Scale": 1, + "OsuShift": true, + "ShiftX": 0, + "ShiftY": 0, + "ScaleStoryboardWithPlayfield": false, + "MoveStoryboardWithPlayfield": false, + "LeadInTime": 3, + "LeadInHold": 2, + "FadeOutTime": 5, + "SeizureWarning": { + "Enabled": false, + "Duration": 1 + }, + "Background": { + "LoadStoryboards": false, + "LoadVideos": false, + "FlashToTheBeat": false, + "Dim": { + "Intro": 1, + "Normal": 1, + "Breaks": 1 + }, + "Parallax": { + "Enabled": true, + "Amount": 0, + "Speed": 0 + }, + "Blur": { + "Enabled": false, + "Values": { + "Intro": 0, + "Normal": 0.15, + "Breaks": 0.1 + } + }, + "Triangles": { + "Enabled": false, + "Shadowed": false, + "DrawOverBlur": false, + "ParallaxMultiplier": 0, + "Density": 1, + "Scale": 1, + "Speed": 1 + } + }, + "Logo": { + "Enabled": false, + "DrawSpectrum": false, + "Dim": { + "Intro": 0, + "Normal": 1, + "Breaks": 1 + } + }, + "Bloom": { + "Enabled": false, + "BloomToTheBeat": false, + "BloomBeatAddition": 0.25, + "Threshold": 0.2, + "Blur": 0.4, + "Power": 0.3 + } + }, + "CursorDance": { + "Movers": [ + { + "Mover": "linear", + "SliderDance": false, + "RandomSliderDance": false + } + ], + "Spinners": [ + { + "Mover": "circle", + "CenterOffsetX": 0, + "CenterOffsetY": 0, + "Radius": 100 + } + ], + "ComboTag": false, + "Battle": false, + "DoSpinnersTogether": true, + "TAGSliderDance": false, + "MoverSettings": { + "Bezier": [ + { + "Aggressiveness": 60, + "SliderAggressiveness": 3 + } + ], + "Flower": [ + { + "AngleOffset": 90, + "DistanceMult": 0.666, + "StreamAngleOffset": 90, + "LongJump": -1, + "LongJumpMult": 0.7, + "LongJumpOnEqualPos": false + } + ], + "HalfCircle": [ + { + "RadiusMultiplier": 1, + "StreamTrigger": 130 + } + ], + "Spline": [ + { + "RotationalForce": false, + "StreamHalfCircle": true, + "StreamWobble": true, + "WobbleScale": 0.67 + } + ], + "Momentum": [ + { + "SkipStackAngles": false, + "StreamRestrict": true, + "DurationMult": 2, + "DurationTrigger": 500, + "StreamMult": 1, + "RestrictAngle": 89, + "RestrictArea": 40, + "RestrictInvert": true, + "DistanceMult": 0.7, + "DistanceMultOut": 0.45 + } + ], + "ExGon": [ + { + "Delay": 50 + } + ], + "Linear": [ + { + "WaitForPreempt": true, + "ReactionTime": 100, + "ChoppyLongObjects": false + } + ], + "Pippi": [ + { + "RotationSpeed": 1.6, + "RadiusMultiplier": 0.98, + "SpinnerRadius": 100 + } + ] + } + }, + "Knockout": { + "Mode": 0, + "GraceEndTime": -10, + "BubbleMinimumCombo": 200, + "ExcludeMods": "EZHT", + "HideMods": "", + "MaxPlayers": 50, + "MinPlayers": 1, + "RevivePlayersAtEnd": false, + "LiveSort": true, + "SortBy": "Score", + "HideOverlayOnBreaks": false, + "MinCursorSize": 3, + "MaxCursorSize": 7, + "SmokeEnabled": false, + "AddDanser": false, + "DanserName": "danser" + }, + "Recording": { + "FrameWidth": 1280, + "FrameHeight": 720, + "FPS": 24, + "EncodingFPSCap": 0, + "Encoder": "h264_nvenc", + "libx264": { + "RateControl": "crf", + "Bitrate": "10M", + "CRF": 14, + "Profile": "high", + "Preset": "faster", + "AdditionalOptions": "" + }, + "libx265": { + "RateControl": "crf", + "Bitrate": "10M", + "CRF": 18, + "Preset": "fast", + "AdditionalOptions": "" + }, + "h264_nvenc": { + "RateControl": "cq", + "Bitrate": "10M", + "CQ": 14, + "Profile": "high", + "Preset": "p7", + "AdditionalOptions": "" + }, + "hevc_nvenc": { + "RateControl": "cq", + "Bitrate": "10M", + "CQ": 18, + "Preset": "p7", + "AdditionalOptions": "" + }, + "av1_nvenc": { + "RateControl": "cbr", + "Bitrate": "5M", + "CQ": 0, + "Preset": "p7", + "AdditionalOptions": "" + }, + "h264_qsv": { + "RateControl": "icq", + "Bitrate": "10M", + "Quality": 15, + "Profile": "high", + "Preset": "slow", + "AdditionalOptions": "" + }, + "hevc_qsv": { + "RateControl": "icq", + "Bitrate": "10M", + "Quality": 20, + "Preset": "slow", + "AdditionalOptions": "" + }, + "custom": { + "CustomOptions": "" + }, + "PixelFormat": "yuv420p", + "Filters": "", + "AudioCodec": "aac", + "aac": { + "Bitrate": "192k", + "AdditionalOptions": "" + }, + "libmp3lame": { + "RateControl": "abr", + "TargetBitrate": "192k", + "AdditionalOptions": "" + }, + "libopus": { + "RateControl": "vbr", + "TargetBitrate": "192k", + "AdditionalOptions": "" + }, + "flac": { + "CompressionLevel": 12, + "AdditionalOptions": "" + }, + "customAudio": { + "CustomOptions": "" + }, + "AudioFilters": "", + "OutputDir": "videos", + "Container": "mp4", + "ShowFFmpegLogs": true, + "MotionBlur": { + "Enabled": false, + "OversampleMultiplier": 4, + "BlendFrames": 8, + "BlendFunctionID": 27, + "GaussWeightsMult": 1.5 + } + }, + "Debug": { + "PerfGraph": { + "MaxRange": 1.2 + } + } +}