Spaces:
Sleeping
Sleeping
Download Dockerfile from webzepetoku/multi: direct link, hf CLI and curl.
- Browser
- Download file 3.37 kB
-
https://huggingface.co/spaces/webzepetoku/multi/resolve/0f9a8d12a3c158366de97f30c665979b0a66232c/Dockerfile
- Command line
-
hf download hf://spaces/webzepetoku/multi@0f9a8d12a3c158366de97f30c665979b0a66232c/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/webzepetoku/multi/resolve/0f9a8d12a3c158366de97f30c665979b0a66232c/Dockerfile
3.37 kB
| # ==========================================# | |
| # STAGE 0: Base Linux (Sudah include Linux IL2CPP) | |
| # ========================================== | |
| FROM unityci/editor:ubuntu-2022.3.34f1-linux-il2cpp-3 AS base-engine | |
| # ==========================================# | |
| # STAGE 1: Injeksi Android Build Support | |
| # ========================================== | |
| FROM unityci/editor:ubuntu-2022.3.34f1-android-3 AS source-android | |
| FROM base-engine AS step-android | |
| COPY --from=source-android /opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer /opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer | |
| # ==========================================# | |
| # STAGE 2: Injeksi iOS Build Support | |
| # ========================================== | |
| FROM unityci/editor:ubuntu-2022.3.34f1-ios-3 AS source-ios | |
| FROM step-android AS step-ios | |
| COPY --from=source-ios /opt/unity/Editor/Data/PlaybackEngines/iOSSupport /opt/unity/Editor/Data/PlaybackEngines/iOSSupport | |
| # ==========================================# | |
| # STAGE 3: Injeksi Mac Build Support (Mono) | |
| # ========================================== | |
| FROM unityci/editor:ubuntu-2022.3.34f1-mac-mono-3 AS source-mac | |
| FROM step-ios AS step-mac | |
| COPY --from=source-mac /opt/unity/Editor/Data/PlaybackEngines/MacStandaloneSupport /opt/unity/Editor/Data/PlaybackEngines/MacStandaloneSupport | |
| # ==========================================# | |
| # STAGE 4: Injeksi WebGL Build Support | |
| # ========================================== | |
| FROM unityci/editor:ubuntu-2022.3.34f1-webgl-3 AS source-webgl | |
| FROM step-mac AS step-webgl | |
| COPY --from=source-webgl /opt/unity/Editor/Data/PlaybackEngines/WebGLSupport /opt/unity/Editor/Data/PlaybackEngines/WebGLSupport | |
| # ==========================================# | |
| # STAGE 5: Injeksi Windows Build Support (Mono) | |
| # ========================================== | |
| FROM unityci/editor:ubuntu-2022.3.34f1-windows-mono-3 AS source-win | |
| FROM step-webgl AS step-win | |
| COPY --from=source-win /opt/unity/Editor/Data/PlaybackEngines/WindowsStandaloneSupport /opt/unity/Editor/Data/PlaybackEngines/WindowsStandaloneSupport | |
| # ==========================================# | |
| # STAGE 6: Final Setup (Python, Tools & App) | |
| # ========================================== | |
| FROM step-win AS final-build | |
| USER root | |
| ENV UNITY_PATH=/opt/unity/Editor/Unity | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Setup Timezone | |
| RUN apt-get update && apt-get install -y tzdata | |
| ENV TZ=Asia/Jakarta | |
| RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
| # Instalasi Python & Dependensi (Menyesuaikan dengan Ubuntu Default) | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| python3-dev \ | |
| curl \ | |
| libnss3 \ | |
| ca-certificates \ | |
| xvfb \ | |
| && python3 -m pip install --no-cache-dir --upgrade pip \ | |
| && python3 -m pip install --no-cache-dir \ | |
| fastapi \ | |
| uvicorn \ | |
| boto3 \ | |
| requests \ | |
| httpx \ | |
| python-multipart \ | |
| aiofiles \ | |
| pydantic \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| ENV HOME=/tmp | |
| WORKDIR /app | |
| # Setup Folder Unity Writable (Penting agar lisensi tidak mental) | |
| RUN mkdir -p /tmp/.local/share/unity3d/Unity /tmp/.config/unity3d /tmp/.cache/unity3d && \ | |
| chmod -R 777 /tmp | |
| # Salin Project | |
| COPY --chown=1000:1000 . /app | |
| RUN chmod -R 777 /app | |
| USER 1000 | |
| EXPOSE 7860 | |
| # CMD menggunakan python3 default sistem | |
| CMD ["python3", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |