Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works with nvidia drivers #15

Open
pierallard opened this issue Jun 29, 2017 · 0 comments
Open

Works with nvidia drivers #15

pierallard opened this issue Jun 29, 2017 · 0 comments

Comments

@pierallard
Copy link

pierallard commented Jun 29, 2017

So, the solution comes in big part from this:
NVIDIA/nvidia-docker#136 (comment)

A working solution is to:

  • use a Dockerfile, mix of the previous page and this repo
  • use nvidia-docker to run the image $ nvidia-docker run -it --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" yolo bash
  • do the install manually
  • update wine config to display it in a window (800x600 works)

Dockerfile:

FROM ubuntu

# install GLX-Gears
RUN apt-get update && apt-get install -y \
    mesa-utils && \
    rm -rf /var/lib/apt/lists/*

# nvidia-docker hooks
LABEL com.nvidia.volumes.needed="nvidia_driver"
ENV PATH /usr/local/nvidia/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}

RUN dpkg --add-architecture i386

RUN apt-get update && apt-get install -y wget software-properties-common python-software-properties apt-transport-https

RUN wget -nc https://repos.wine-staging.com/wine/Release.key
RUN apt-key add Release.key
RUN apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/'

RUN more /etc/apt/sources.list | grep 'wi'

RUN apt-get update && apt-get install -y --install-recommends winehq-staging && rm -rf /var/cache/apt/

# Replace 1000 with your user / group id
RUN export uid=1000 gid=1000 && \
mkdir -p /home/developer && \
mkdir -p /etc/sudoers.d && \
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:${uid}:" >> /etc/group && \
echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \
chmod 0440 /etc/sudoers.d/developer && \
chown ${uid}:${gid} -R /home/developer

USER developer
ENV HOME /home/developer
WORKDIR /home/developer

RUN mkdir -p /home/developer/install
VOLUME /home/developer/install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant