0

I would like to be able to perform GUI operations on a container created with Docker. The host environment is Centos.

We know that Xsever allows GUI manipulation of containers. Run docker-compose up -d. Run docker-compose exec ml bash. I just put it in the container, but the GUI does not start up. How can I get the GUI to work?

Dockerfile

FROM nvcr.io/nvidia/pytorch:21.10-py3
WORKDIR /home/workspace
# COPY . /home/workspace

COPY requirements.txt ${PWD}
RUN pip install -r requirements.txt

docker-cmopose.yml

version: '2.3'
services:
  ml:
    build: .
    image: ml
    volumes:
      - .:/home/workspace
    command: bash
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    tty: true
    environment:
      - DISPLAY=${DISPLAY}
asdfe
  • 39
  • 3

0 Answers0