-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from heralight/main
fix accel - add docker-compose - fix keys
- Loading branch information
Showing
7 changed files
with
319 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
keys | ||
# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,windows,powershell | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,windows,powershell | ||
|
||
### Linux ### | ||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### macOS Patch ### | ||
# iCloud generated files | ||
*.icloud | ||
|
||
### PowerShell ### | ||
# Exclude packaged modules | ||
*.zip | ||
|
||
# Exclude .NET assemblies from source | ||
*.dll | ||
|
||
### Windows ### | ||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/linux,macos,windows,powershell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
FROM adoptopenjdk/openjdk11:alpine-jre | ||
FROM openjdk:18-jdk-slim | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
#WORKDIR / | ||
#============================= | ||
# Install Dependenices | ||
#============================= | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt update && apt install -y curl \ | ||
sudo wget unzip bzip2 libdrm-dev \ | ||
libxkbcommon-dev libgbm-dev libasound-dev libnss3 \ | ||
libxcursor1 libpulse-dev libxshmfence-dev \ | ||
xauth xvfb x11vnc fluxbox wmctrl libdbus-glib-1-2 socat \ | ||
virt-manager | ||
|
||
|
||
# Docker labels. | ||
LABEL maintainer "Halim Qarroum <[email protected]>" | ||
LABEL description "A Docker image allowing to run an Android emulator" | ||
LABEL version "1.0.0" | ||
|
||
# Installing required packages. | ||
RUN apk update && \ | ||
apk upgrade && \ | ||
apk add --no-cache \ | ||
bash \ | ||
unzip \ | ||
wget \ | ||
libvirt-daemon \ | ||
dbus \ | ||
polkit \ | ||
socat \ | ||
virt-manager && \ | ||
# Cleanup APK. | ||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* | ||
|
||
# Arguments that can be overriden at build-time. | ||
ARG INSTALL_ANDROID_SDK=1 | ||
|
@@ -31,15 +33,15 @@ ARG GPU_ACCELERATED=false | |
|
||
# Environment variables. | ||
ENV ANDROID_SDK_ROOT=/opt/android \ | ||
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \ | ||
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \ | ||
API_LEVEL=$API_LEVEL \ | ||
DEVICE_ID=$DEVICE_ID \ | ||
ARCHITECTURE=$ARCHITECTURE \ | ||
ABI=${IMG_TYPE}/${ARCHITECTURE} \ | ||
GPU_ACCELERATED=$GPU_ACCELERATED \ | ||
QTWEBENGINE_DISABLE_SANDBOX=1 \ | ||
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=10 | ||
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \ | ||
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \ | ||
API_LEVEL=$API_LEVEL \ | ||
DEVICE_ID=$DEVICE_ID \ | ||
ARCHITECTURE=$ARCHITECTURE \ | ||
ABI=${IMG_TYPE}/${ARCHITECTURE} \ | ||
GPU_ACCELERATED=$GPU_ACCELERATED \ | ||
QTWEBENGINE_DISABLE_SANDBOX=1 \ | ||
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=10 | ||
|
||
# Exporting environment variables to keep in the path | ||
# Android SDK binaries and shared libraries. | ||
|
@@ -60,7 +62,7 @@ RUN mkdir /root/.android/ && \ | |
touch /root/.android/repositories.cfg | ||
|
||
# Exporting ADB keys. | ||
COPY keys/* /root/.android/ | ||
#COPY keys/* /root/.android/ | ||
|
||
# The following layers will download the Android command-line tools | ||
# to install the Android SDK, emulator and system images. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
FROM nvidia/cuda:12.1.0-base-ubuntu22.04 | ||
FROM nvidia/cuda:12.3.1-base-ubuntu22.04 | ||
|
||
# Docker labels. | ||
LABEL maintainer "Halim Qarroum <[email protected]>" | ||
LABEL description "A Docker image allowing to run an Android emulator" | ||
LABEL version "1.1.0" | ||
LABEL version "1.2.0" | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# Installing required packages. | ||
RUN apt update -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ | ||
bash \ | ||
unzip \ | ||
wget \ | ||
libvirt-daemon \ | ||
dbus \ | ||
openjdk-11-jdk \ | ||
virt-manager \ | ||
libvulkan1 \ | ||
xvfb \ | ||
libgl1-mesa-glx \ | ||
libgl1-mesa-dri \ | ||
socat \ | ||
iproute2 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
apt install -y --no-install-recommends \ | ||
bash \ | ||
unzip \ | ||
wget \ | ||
libvirt-daemon \ | ||
dbus \ | ||
openjdk-18-jre-headless \ | ||
virt-manager \ | ||
libvulkan1 \ | ||
xvfb \ | ||
libgl1-mesa-glx \ | ||
libgl1-mesa-dri \ | ||
socat \ | ||
htop \ | ||
iproute2 && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Arguments that can be overriden at build-time. | ||
ARG INSTALL_ANDROID_SDK=1 | ||
|
@@ -34,15 +36,15 @@ ARG GPU_ACCELERATED=true | |
|
||
# Environment variables. | ||
ENV ANDROID_SDK_ROOT=/opt/android \ | ||
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \ | ||
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \ | ||
API_LEVEL=$API_LEVEL \ | ||
DEVICE_ID=$DEVICE_ID \ | ||
ARCHITECTURE=$ARCHITECTURE \ | ||
ABI=${IMG_TYPE}/${ARCHITECTURE} \ | ||
GPU_ACCELERATED=$GPU_ACCELERATED \ | ||
QTWEBENGINE_DISABLE_SANDBOX=1 \ | ||
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=10 | ||
ANDROID_PLATFORM_VERSION="platforms;android-$API_LEVEL" \ | ||
PACKAGE_PATH="system-images;android-${API_LEVEL};${IMG_TYPE};${ARCHITECTURE}" \ | ||
API_LEVEL=$API_LEVEL \ | ||
DEVICE_ID=$DEVICE_ID \ | ||
ARCHITECTURE=$ARCHITECTURE \ | ||
ABI=${IMG_TYPE}/${ARCHITECTURE} \ | ||
GPU_ACCELERATED=$GPU_ACCELERATED \ | ||
QTWEBENGINE_DISABLE_SANDBOX=1 \ | ||
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=10 | ||
|
||
# Exporting environment variables for keeping in the path | ||
# Android SDK binaries and shared libraries. | ||
|
@@ -60,10 +62,10 @@ EXPOSE 5554 5555 | |
|
||
# Initializing the required directories. | ||
RUN mkdir /root/.android/ && \ | ||
touch /root/.android/repositories.cfg | ||
touch /root/.android/repositories.cfg | ||
|
||
# Exporting ADB keys. | ||
COPY keys/* /root/.android/ | ||
#COPY keys/* /root/.android/ | ||
|
||
# The following layers will download the Android command-line tools | ||
# to install the Android SDK, emulator and system images. | ||
|
@@ -76,6 +78,5 @@ RUN /opt/install-sdk.sh | |
COPY scripts/start-emulator.sh /opt/ | ||
COPY scripts/emulator-monitoring.sh /opt/ | ||
RUN chmod +x /opt/*.sh | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT ["/opt/start-emulator.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.