initial commit, adds notes.md for instructions, adds data, adds python code
This commit is contained in:
		
							
								
								
									
										37
									
								
								.devcontainer/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								.devcontainer/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,37 @@
 | 
			
		||||
FROM tensorflow/tensorflow:1.13.2-gpu
 | 
			
		||||
 | 
			
		||||
## Install updates and network tool
 | 
			
		||||
RUN apt-get update -y && apt-get upgrade -y && apt install net-tools -y
 | 
			
		||||
 | 
			
		||||
## Install basic functions
 | 
			
		||||
RUN apt-get install sudo -y
 | 
			
		||||
 | 
			
		||||
## Install git
 | 
			
		||||
RUN apt-get install git -y
 | 
			
		||||
 | 
			
		||||
## Install python requirements
 | 
			
		||||
COPY requirements.txt .
 | 
			
		||||
RUN pip install -r requirements.txt
 | 
			
		||||
 | 
			
		||||
## Create user and group
 | 
			
		||||
ARG HOST_USER_UID=1000
 | 
			
		||||
ARG HOST_USER_GID=1000
 | 
			
		||||
RUN groupadd -g $HOST_USER_GID containergroup 
 | 
			
		||||
RUN useradd -m -l -u $HOST_USER_UID -g $HOST_USER_GID containeruser 
 | 
			
		||||
 | 
			
		||||
## Passwordless sudo for user    
 | 
			
		||||
RUN usermod -aG sudo containeruser
 | 
			
		||||
RUN echo "containeruser ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/containeruser && \
 | 
			
		||||
    chmod 0440 /etc/sudoers.d/containeruser
 | 
			
		||||
 | 
			
		||||
## Activate User    
 | 
			
		||||
USER containeruser
 | 
			
		||||
 | 
			
		||||
## Set working directory
 | 
			
		||||
WORKDIR /home/containeruser
 | 
			
		||||
 | 
			
		||||
## Workaround for vscode bug
 | 
			
		||||
ENV HOME=/home/containeruser
 | 
			
		||||
 | 
			
		||||
## Keep container running forever
 | 
			
		||||
CMD tail -f /dev/null
 | 
			
		||||
							
								
								
									
										12
									
								
								.devcontainer/devcontainer.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.devcontainer/devcontainer.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
{
 | 
			
		||||
    "name": "siamese",
 | 
			
		||||
    "dockerComposeFile": "docker-compose.yml",
 | 
			
		||||
    "workspaceMount": "/workspace",
 | 
			
		||||
    "workspaceFolder": "/workspace",
 | 
			
		||||
    "service": "devcontainer",
 | 
			
		||||
    "shutdownAction": "stopCompose",
 | 
			
		||||
    "extensions": [
 | 
			
		||||
        "ms-python.python",
 | 
			
		||||
        "ms-azuretools.vscode-docker"
 | 
			
		||||
    ]
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										22
									
								
								.devcontainer/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.devcontainer/docker-compose.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
version: '2.3'
 | 
			
		||||
services:
 | 
			
		||||
  devcontainer:
 | 
			
		||||
  
 | 
			
		||||
    build:
 | 
			
		||||
      context: ..
 | 
			
		||||
      dockerfile: .devcontainer/Dockerfile                                                                                                              
 | 
			
		||||
      args:
 | 
			
		||||
        HOST_USER_UID: 1000
 | 
			
		||||
        HOST_USER_GID: 1000
 | 
			
		||||
 | 
			
		||||
    network_mode: host
 | 
			
		||||
    environment:
 | 
			
		||||
      - DISPLAY=$DISPLAY
 | 
			
		||||
    runtime: nvidia
 | 
			
		||||
 | 
			
		||||
    volumes:
 | 
			
		||||
      - ..:/workspace
 | 
			
		||||
      - ~/.gitconfig:/home/containeruser/.gitconfig
 | 
			
		||||
      - ~/.ssh:/home/containeruser/.ssh
 | 
			
		||||
 | 
			
		||||
    command: sleep infinity 
 | 
			
		||||
		Reference in New Issue
	
	Block a user