Posts

Showing posts with the label ubuntu

Future solutions

Image
Clash Royale CLAN TAG #URR8PPP Future solutions I am working with a large data set, which I use to make certain calculations. Since it is a huge data set, my machine, I am working on, is doing the job excessively long, for this reason I decided to use the future package in order to distribute the work between several machines and speed up the calculations. So, my problem is that through the future (using putty & ssh) I can connect to those machines (in parallel), but the work itself is doing the main one, without any distribution. Maybe you can advice some solution: My code: library(future) workers <- c("000.000.0.000", "111.111.1.111") plan(remote, envir = parent.frame(), workers= workers, myip = "222.222.2.22") start <- proc.time() cl <- makeClusterPSOCK( c("000.000.0.000", "111.111.1.111"), user = "...", rshcmd = c("plink", "-ssh", "-pw", "..."), rshopts = c("-i...

Jenkins, specifying JAVA_HOME

Image
Clash Royale CLAN TAG #URR8PPP Jenkins, specifying JAVA_HOME I installed openjdk-6-jdk on my ubuntu box using apt-get. In system info jenkins is telling me Java.Home is /usr/lib/jvm/java-6-openjdk/jre /usr/lib/jvm/java-6-openjdk/jre However when I specify that directory as JAVA_HOME in Jenkins : "configure system", it returns error message saying that directory does not look like a jdk directory. JAVA_HOME it is also failing to pick up my maven install. Am I missing something obvious ? 12 Answers 12 Your JAVA_HOME variable must be setted to /usr/lib/jvm/java-6-openjdk and it must be available for the user that starts Jenkins. From Kyle Strand comment: As of April 2015 (I think), Jenkins requires Java7. Also note that the java binary path (JAVA) must be set to the correct version if the system default is still Java 6. Finally, for anyone wondering where these variables are set, it's i...

Bad:Can't finish “os.path.dirname(__file)” in ubuntu (python)(google cloud speech)

Image
Clash Royale CLAN TAG #URR8PPP Bad:Can't finish “os.path.dirname(__file)” in ubuntu (python)(google cloud speech) thanks for helping me! I just set up google cloud speech and tried to run the code in "Make an audio transcription request" in this website: Quickstart: Using Client Libraries the code is shown below after I open ubuntu terminal: export GOOGLE_APPLICATION_CREDENTIALS="/home/luffy/Lumariatuan-xxxxxxxxxxxx.json" python import io import os from google.cloud import speech from google.cloud.speech import enums from google.cloud.speech import types client = speech.SpeechClient() # The name of the audio file to transcribe file_name = os.path.join( os.path.dirname(__file__), 'resources', 'audio.raw') However, when I run the last part os.path.dirname(__file) in Ubuntu 18.04 terminal in python , the error happens like below: os.path.dirname(__file) * NameError: name '__file__' is not defined* How can I solve the p...

Problems of Pytorch installation on Ubuntu 17.10 (GPU)

Image
Clash Royale CLAN TAG #URR8PPP Problems of Pytorch installation on Ubuntu 17.10 (GPU) I would like to use PyTorch and its GPU computations on my computer. I have a computer running with Ubuntu 17.10. The computer (Alienware m17x) has two graphic cards: In order to install PyTorch, I followed the instructions on the PyTorch website pytorch.org 1) I installed CUDA 9 with the deb file: https://developer.nvidia.com/cuda-downloads => Linux/x86_64/Ubuntu/17.04/deb (local) 2) I installed Pytorch using the conda command line: conda install pytorch torchvision cuda90 -c pytorch None of these two steps returned me any type of errors. I restarted my computer. Apparently the two cards are detected: $ lspci | grep -i vga 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GF114M [GeForce GTX 675M] (rev a1) But apparently there is something wrong with the drivers or CUDA itself. nvidia-de...

Docker - cannot mount volume over existing file, file exists

Image
Clash Royale CLAN TAG #URR8PPP Docker - cannot mount volume over existing file, file exists I'm trying to build a data container for my application in Docker. I run this command to expose some volumes: docker run --name svenv.nl-data -v /etc/environment -v /etc/ssl/certs -v /var/lib/mysql -d svenv/svenv.nl-data The problem is that i get this error from this command: Error response from daemon: cannot mount volume over existing file, file exists /var/lib/docker/aufs/mnt/aefa66cf55357e2e1e4f84c2d4d2d03fa2375c8900fe3c0e1e6bc02f13e54d05/etc/environment If I understand the Docker documentation correctly. Creating volumes for single files is supported. So I don't understand why I get this error. Is there somebody who can explain this to me? I'm running Docker 1.9.1 on Ubuntu 14.04. have you solved it in some way ? – Robert Apr 13 '16 at 1:32 ...

Ubuntu cronjob without saving output

Ubuntu cronjob without saving output I want to call a php script on my VPS with cronjob, but I want it to do simple get request, without saving any logs, outputs and ect., just to make the php file to do its job, I don't want unnecessary files on my VPS. So, this is my command: * * * * * wget -q -O - http://example.com/cronjob/save_currency_rates Is this what I need? I'm not sure if this command saves some files, I'm not familiar with linux so far. I read the manual but it is confusing. 2 Answers 2 Try wget -q -O - http://example.com/cronjob/save_currency_rates >/dev/null 2>&1 wget -q -O - http://example.com/cronjob/save_currency_rates >/dev/null 2>&1 What is the difference? What di the last to parameters behind the path: >/dev/null 2>&1 – vinsa Feb 20 '15 at 13:22 ...