feature: set sparse Dockerfile with Python interpreter only
This commit is contained in:
		@@ -27,15 +27,15 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "Wed Mar 11 07:16:17 2020       \n",
 | 
			
		||||
      "Mon Jun 22 11:24:08 2020       \n",
 | 
			
		||||
      "+-----------------------------------------------------------------------------+\n",
 | 
			
		||||
      "| NVIDIA-SMI 440.48.02    Driver Version: 440.48.02    CUDA Version: 10.2     |\n",
 | 
			
		||||
      "| NVIDIA-SMI 440.82       Driver Version: 440.82       CUDA Version: 10.2     |\n",
 | 
			
		||||
      "|-------------------------------+----------------------+----------------------+\n",
 | 
			
		||||
      "| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |\n",
 | 
			
		||||
      "| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |\n",
 | 
			
		||||
      "|===============================+======================+======================|\n",
 | 
			
		||||
      "|   0  GeForce RTX 207...  Off  | 00000000:01:00.0 Off |                  N/A |\n",
 | 
			
		||||
      "|  0%   42C    P8     1W / 215W |   1788MiB /  7974MiB |      0%      Default |\n",
 | 
			
		||||
      "|   0  GeForce RTX 207...  Off  | 00000000:01:00.0  On |                  N/A |\n",
 | 
			
		||||
      "|  0%   49C    P0    38W / 215W |    430MiB /  7974MiB |      5%      Default |\n",
 | 
			
		||||
      "+-------------------------------+----------------------+----------------------+\n",
 | 
			
		||||
      "                                                                               \n",
 | 
			
		||||
      "+-----------------------------------------------------------------------------+\n",
 | 
			
		||||
@@ -87,10 +87,7 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "WARNING:tensorflow:From <ipython-input-3-d1bfbb527297>:3: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.\n",
 | 
			
		||||
      "Instructions for updating:\n",
 | 
			
		||||
      "Use `tf.config.list_physical_devices('GPU')` instead.\n",
 | 
			
		||||
      "True\n"
 | 
			
		||||
      "[PhysicalDevice(name='/physical_device:XLA_GPU:0', device_type='XLA_GPU')]\n"
 | 
			
		||||
     ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
@@ -101,30 +98,20 @@
 | 
			
		||||
       " memory_limit: 268435456\n",
 | 
			
		||||
       " locality {\n",
 | 
			
		||||
       " }\n",
 | 
			
		||||
       " incarnation: 8034786465358909470,\n",
 | 
			
		||||
       " incarnation: 12436949185972503812,\n",
 | 
			
		||||
       " name: \"/device:XLA_CPU:0\"\n",
 | 
			
		||||
       " device_type: \"XLA_CPU\"\n",
 | 
			
		||||
       " memory_limit: 17179869184\n",
 | 
			
		||||
       " locality {\n",
 | 
			
		||||
       " }\n",
 | 
			
		||||
       " incarnation: 13772661904993777233\n",
 | 
			
		||||
       " incarnation: 9674938692146126962\n",
 | 
			
		||||
       " physical_device_desc: \"device: XLA_CPU device\",\n",
 | 
			
		||||
       " name: \"/device:GPU:0\"\n",
 | 
			
		||||
       " device_type: \"GPU\"\n",
 | 
			
		||||
       " memory_limit: 5480775680\n",
 | 
			
		||||
       " locality {\n",
 | 
			
		||||
       "   bus_id: 1\n",
 | 
			
		||||
       "   links {\n",
 | 
			
		||||
       "   }\n",
 | 
			
		||||
       " }\n",
 | 
			
		||||
       " incarnation: 8336380964433791501\n",
 | 
			
		||||
       " physical_device_desc: \"device: 0, name: GeForce RTX 2070 SUPER, pci bus id: 0000:01:00.0, compute capability: 7.5\",\n",
 | 
			
		||||
       " name: \"/device:XLA_GPU:0\"\n",
 | 
			
		||||
       " device_type: \"XLA_GPU\"\n",
 | 
			
		||||
       " memory_limit: 17179869184\n",
 | 
			
		||||
       " locality {\n",
 | 
			
		||||
       " }\n",
 | 
			
		||||
       " incarnation: 4817022749254415174\n",
 | 
			
		||||
       " incarnation: 7870544216044264725\n",
 | 
			
		||||
       " physical_device_desc: \"device: XLA_GPU device\"]"
 | 
			
		||||
      ]
 | 
			
		||||
     },
 | 
			
		||||
@@ -136,7 +123,7 @@
 | 
			
		||||
   "source": [
 | 
			
		||||
    "import tensorflow as tf\n",
 | 
			
		||||
    "from tensorflow.python.client import device_lib\n",
 | 
			
		||||
    "print(tf.test.is_gpu_available(cuda_only=True))\n",
 | 
			
		||||
    "print(tf.config.list_physical_devices('XLA_GPU'))\n",
 | 
			
		||||
    "device_lib.list_local_devices()"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
@@ -148,11 +135,11 @@
 | 
			
		||||
    {
 | 
			
		||||
     "data": {
 | 
			
		||||
      "text/plain": [
 | 
			
		||||
       "tensor([[0.1091, 0.0178, 0.2500],\n",
 | 
			
		||||
       "        [0.1409, 0.9612, 0.0325],\n",
 | 
			
		||||
       "        [0.8944, 0.3869, 0.9657],\n",
 | 
			
		||||
       "        [0.8131, 0.5454, 0.2587],\n",
 | 
			
		||||
       "        [0.6570, 0.0147, 0.1361]])"
 | 
			
		||||
       "tensor([[0.0399, 0.1738, 0.2486],\n",
 | 
			
		||||
       "        [0.7464, 0.1461, 0.8991],\n",
 | 
			
		||||
       "        [0.7264, 0.9835, 0.8844],\n",
 | 
			
		||||
       "        [0.4544, 0.8331, 0.8435],\n",
 | 
			
		||||
       "        [0.0109, 0.0689, 0.2997]])"
 | 
			
		||||
      ]
 | 
			
		||||
     },
 | 
			
		||||
     "execution_count": 4,
 | 
			
		||||
@@ -202,7 +189,7 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "248 ms ± 174 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
 | 
			
		||||
      "276 ms ± 9.97 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
   ],
 | 
			
		||||
@@ -236,13 +223,13 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "78.2 ms ± 250 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
 | 
			
		||||
      "82.1 ms ± 1.85 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
   ],
 | 
			
		||||
   "source": [
 | 
			
		||||
    "%%timeit\n",
 | 
			
		||||
    "# Calculate the projection matrix of x\n",
 | 
			
		||||
    "# Calculate the projection matrix of x on the CPU\n",
 | 
			
		||||
    "H = x.mm( (x.t().mm(x)).inverse() ).mm(x.t())"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
@@ -262,16 +249,16 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "tensor([[0.0962, 0.3125, 0.7327, 0.5982, 0.4624],\n",
 | 
			
		||||
      "        [0.4655, 0.4890, 0.9603, 0.4339, 0.0524],\n",
 | 
			
		||||
      "        [0.9294, 0.9639, 0.6312, 0.1752, 0.7721],\n",
 | 
			
		||||
      "        [0.5533, 0.3656, 0.9329, 0.8796, 0.9513],\n",
 | 
			
		||||
      "        [0.4949, 0.0972, 0.2892, 0.7570, 0.2847]], device='cuda:0')\n",
 | 
			
		||||
      "tensor([[0.0962, 0.3125, 0.7327, 0.5982, 0.4624],\n",
 | 
			
		||||
      "        [0.4655, 0.4890, 0.9603, 0.4339, 0.0524],\n",
 | 
			
		||||
      "        [0.9294, 0.9639, 0.6312, 0.1752, 0.7721],\n",
 | 
			
		||||
      "        [0.5533, 0.3656, 0.9329, 0.8796, 0.9513],\n",
 | 
			
		||||
      "        [0.4949, 0.0972, 0.2892, 0.7570, 0.2847]], dtype=torch.float64)\n"
 | 
			
		||||
      "tensor([[0.2854, 0.3384, 0.6473, 0.0433, 0.5640],\n",
 | 
			
		||||
      "        [0.3960, 0.0449, 0.6597, 0.5347, 0.8402],\n",
 | 
			
		||||
      "        [0.0048, 0.9231, 0.0311, 0.2545, 0.0409],\n",
 | 
			
		||||
      "        [0.6506, 0.8651, 0.7558, 0.1086, 0.8135],\n",
 | 
			
		||||
      "        [0.1083, 0.0039, 0.6049, 0.3596, 0.1359]], device='cuda:0')\n",
 | 
			
		||||
      "tensor([[0.2854, 0.3384, 0.6473, 0.0433, 0.5640],\n",
 | 
			
		||||
      "        [0.3960, 0.0449, 0.6597, 0.5347, 0.8402],\n",
 | 
			
		||||
      "        [0.0048, 0.9231, 0.0311, 0.2545, 0.0409],\n",
 | 
			
		||||
      "        [0.6506, 0.8651, 0.7558, 0.1086, 0.8135],\n",
 | 
			
		||||
      "        [0.1083, 0.0039, 0.6049, 0.3596, 0.1359]], dtype=torch.float64)\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
   ],
 | 
			
		||||
@@ -295,12 +282,13 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "11.4 ms ± 60.2 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
 | 
			
		||||
      "11.4 ms ± 28.8 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
   ],
 | 
			
		||||
   "source": [
 | 
			
		||||
    "%%timeit\n",
 | 
			
		||||
    "# Calculate the projection matrix of x on the GPU\n",
 | 
			
		||||
    "H = x.mm( (x.t().mm(x)).inverse() ).mm(x.t())"
 | 
			
		||||
   ]
 | 
			
		||||
  },
 | 
			
		||||
@@ -341,11 +329,11 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "tensor([[0.4303, 0.7364, 0.1235, 0.7786, 0.7036],\n",
 | 
			
		||||
      "        [0.3256, 0.4515, 0.7994, 0.9814, 0.7705],\n",
 | 
			
		||||
      "        [0.2292, 0.5194, 0.4354, 0.3964, 0.5804],\n",
 | 
			
		||||
      "        [0.8855, 0.5156, 0.9321, 0.9555, 0.4150],\n",
 | 
			
		||||
      "        [0.0640, 0.0665, 0.1170, 0.9547, 0.2668]], device='cuda:0')\n"
 | 
			
		||||
      "tensor([[0.1101, 0.7887, 0.0641, 0.1327, 0.1681],\n",
 | 
			
		||||
      "        [0.7914, 0.7248, 0.7731, 0.2662, 0.4908],\n",
 | 
			
		||||
      "        [0.2451, 0.3568, 0.4006, 0.2099, 0.5212],\n",
 | 
			
		||||
      "        [0.6195, 0.5120, 0.5212, 0.7321, 0.2272],\n",
 | 
			
		||||
      "        [0.2374, 0.4540, 0.0868, 0.9393, 0.1561]], device='cuda:0')\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
   ],
 | 
			
		||||
@@ -376,11 +364,11 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "tensor([[1.0966e-03, 3.5866e-04, 4.0044e-04, 3.2466e-04, 2.3044e-04],\n",
 | 
			
		||||
      "        [3.5866e-04, 9.7424e-04, 2.8649e-04, 8.2904e-04, 2.0482e-04],\n",
 | 
			
		||||
      "        [4.0044e-04, 2.8649e-04, 5.4179e-04, 1.2729e-04, 9.4659e-05],\n",
 | 
			
		||||
      "        [3.2466e-04, 8.2904e-04, 1.2729e-04, 1.3005e-03, 6.6951e-06],\n",
 | 
			
		||||
      "        [2.3044e-04, 2.0482e-04, 9.4659e-05, 6.6950e-06, 1.3420e-03]],\n",
 | 
			
		||||
      "tensor([[ 6.4681e-04, -1.5392e-05,  3.3608e-04,  2.1025e-04,  8.0912e-05],\n",
 | 
			
		||||
      "        [-1.5392e-05,  5.0718e-04, -1.1769e-04, -2.3084e-05, -2.3264e-04],\n",
 | 
			
		||||
      "        [ 3.3608e-04, -1.1769e-04,  6.9678e-04,  2.2663e-04, -1.8900e-04],\n",
 | 
			
		||||
      "        [ 2.1025e-04, -2.3084e-05,  2.2663e-04,  6.0036e-04,  2.7787e-04],\n",
 | 
			
		||||
      "        [ 8.0912e-05, -2.3264e-04, -1.8900e-04,  2.7787e-04,  1.4208e-03]],\n",
 | 
			
		||||
      "       device='cuda:0')\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
@@ -399,11 +387,11 @@
 | 
			
		||||
     "name": "stdout",
 | 
			
		||||
     "output_type": "stream",
 | 
			
		||||
     "text": [
 | 
			
		||||
      "tensor([[1.0966e-03, 3.5866e-04, 4.0044e-04, 3.2466e-04, 2.3044e-04],\n",
 | 
			
		||||
      "        [3.5866e-04, 9.7424e-04, 2.8649e-04, 8.2904e-04, 2.0482e-04],\n",
 | 
			
		||||
      "        [4.0044e-04, 2.8649e-04, 5.4179e-04, 1.2729e-04, 9.4659e-05],\n",
 | 
			
		||||
      "        [3.2466e-04, 8.2904e-04, 1.2729e-04, 1.3005e-03, 6.6951e-06],\n",
 | 
			
		||||
      "        [2.3044e-04, 2.0482e-04, 9.4659e-05, 6.6950e-06, 1.3420e-03]],\n",
 | 
			
		||||
      "tensor([[ 6.4681e-04, -1.5392e-05,  3.3608e-04,  2.1025e-04,  8.0912e-05],\n",
 | 
			
		||||
      "        [-1.5392e-05,  5.0718e-04, -1.1769e-04, -2.3084e-05, -2.3264e-04],\n",
 | 
			
		||||
      "        [ 3.3608e-04, -1.1769e-04,  6.9678e-04,  2.2663e-04, -1.8900e-04],\n",
 | 
			
		||||
      "        [ 2.1025e-04, -2.3084e-05,  2.2663e-04,  6.0036e-04,  2.7787e-04],\n",
 | 
			
		||||
      "        [ 8.0912e-05, -2.3264e-04, -1.8900e-04,  2.7787e-04,  1.4208e-03]],\n",
 | 
			
		||||
      "       dtype=torch.float64)\n"
 | 
			
		||||
     ]
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user