Spaces:
Sleeping
Sleeping
File size: 1,341 Bytes
8f03243 590eef4 26ea660 8f03243 68a9cc5 b7ad9c7 c893e9e 8f03243 6a7ed5e 4b4106e b7ad9c7 4b4106e c893e9e 346e12d 4b4106e 4d2eee9 6a7ed5e 68a9cc5 26ea660 e394ae1 d1115bb 75c00cd 78e0abf 68a9cc5 75c00cd 26ea660 4b4106e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # Stage 1: Ambil modul dari image Android resmi
FROM unityci/editor:ubuntu-2020.3.9f1-android-0 as android-source
# Stage 2: Gunakan image Linux pilihanmu
FROM unityci/editor:ubuntu-2020.3.9f1-linux-il2cpp-0
USER root
# SALIN MODUL ANDROID SECARA MANUAL (Injeksi Modul)
COPY --from=android-source /opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer /opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer
ENV UNITY_PATH=/opt/unity/Editor/Unity
ENV DEBIAN_FRONTEND=noninteractive
# Instalasi Python 3.8 & Pip
RUN apt-get update && apt-get install -y \
software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update && apt-get install -y \
python3.8 python3.8-distutils python3.8-dev curl libnss3 ca-certificates \
&& curl https://bootstrap.pypa.io/pip/3.8/get-pip.py -o get-pip.py \
&& python3.8 get-pip.py \
&& python3.8 -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
RUN mkdir -p /tmp/.local/share/unity3d/Unity /tmp/.config/unity3d /tmp/.cache/unity3d && \
chmod -R 777 /tmp
COPY --chown=1000:1000 . /app
RUN chmod -R 777 /app
USER 1000
EXPOSE 7860
CMD ["python3.8", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |