title: Model runs normally itself but fails if executed from a Dockerfile
body: <p>I'm getting familiarized with Docker and got confronted with a strange situation. In the project folder, there is a model that should be run and give some output. When I run this model manually from the console, it works normally. But when I execute the same model for the same input file, but from the Dockerfile, I see an error: &quot;Input file cannot be opened!&quot;</p>
  <p>This is how I manually run the model:</p>
  <pre><code>sergei@sergei-VirtualBox:~/projects/mle-training/containerization_hw/models/Starspace$ ./starspace train -trainFile ../../volume/starspace_input_file.txt -model modelSaveFile
  Arguments: 
  lr: 0.01
  dim: 100
  epoch: 5
  maxTrainTime: 8640000
  validationPatience: 10
  saveEveryEpoch: 0
  loss: hinge
  margin: 0.05
  similarity: cosine
  maxNegSamples: 10
  negSearchLimit: 50
  batchSize: 5
  thread: 10
  minCount: 1
  minCountLabel: 1
  label: __label__
  label: __label__
  ngrams: 1
  bucket: 2000000
  adagrad: 1
  trainMode: 0
  fileFormat: fastText
  normalizeText: 0
  dropoutLHS: 0
  dropoutRHS: 0
  useWeight: 0
  weightSep: :
  Start to initialize starspace model.
  Build dict from input file : ../../volume/starspace_input_file.txt
  Read 0M words
  Number of words in dictionary:  6526
  Number of labels in dictionary: 1
  Loading data from file : ../../volume/starspace_input_file.txt
  Total number of examples loaded : 314
  Training epoch 0: 0.01 0.002
  Epoch: 97.1%  lr: 0.010000  loss: 0.000000  eta: &lt;1min   tot: 0h0m0s  (19.4%)
   ---+++                Epoch    0 Train error : 0.00000000 +++--- ☃
  Training epoch 1: 0.008 0.002
  Epoch: 97.1%  lr: 0.008000  loss: 0.000000  eta: &lt;1min   tot: 0h0m0s  (39.4%)
   ---+++                Epoch    1 Train error : 0.00000000 +++--- ☃
  Training epoch 2: 0.006 0.002
  Epoch: 97.1%  lr: 0.006000  loss: 0.000000  eta: &lt;1min   tot: 0h0m0s  (59.4%)
   ---+++                Epoch    2 Train error : 0.00000000 +++--- ☃
  Training epoch 3: 0.004 0.002
  Epoch: 97.1%  lr: 0.004000  loss: 0.000000  eta: &lt;1min   tot: 0h0m1s  (79.4%)
   ---+++                Epoch    3 Train error : 0.00000000 +++--- ☃
  Training epoch 4: 0.002 0.002
  Epoch: 97.1%  lr: 0.002000  loss: 0.000000  eta: &lt;1min   tot: 0h0m1s  (99.4%)
   ---+++                Epoch    4 Train error : 0.00000000 +++--- ☃
  Saving model to file : modelSaveFile
  Saving model in tsv format : modelSaveFile.tsv
  </code></pre>
  <p>And this should happen with that model and that input file.</p>
  <p>Here is how the Dockerfile looks like:</p>
  <pre><code>FROM ubuntu:20.04
  #Needed for Boost install not to hang up for indefinite time (checked experimentally)
  ENV TZ=Europe/Kiev
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &amp;&amp; echo $TZ &gt; /etc/timezone
  
  # Install dependencies:
  RUN apt-get update &amp;&amp; apt-get install -y tzdata
  
  WORKDIR $HOME/projects/mle-training/containerization_hw/models
  RUN apt-get update &amp;&amp; \
      apt-get -qq -y install git &amp;&amp; \
      git clone https://github.com/facebookresearch/Starspace.git
  WORKDIR $HOME/projects/mle-training/containerization_hw/models/Starspace
  RUN apt-get -qq -y install make &amp;&amp; \
      apt-get -qq -y install build-essential &amp;&amp; \
      apt-get -qq -y install libboost-all-dev &amp;&amp; \
      make
  RUN ./starspace train -trainFile ../../volume/starspace_input_file.txt -model modelSaveFile
  COPY modelSaveFile.tsv ../../volume
  </code></pre>
  <p>But when I execute it using the command <code>docker build -t containerization_hw1 . </code>, I see the following output:</p>
  <pre><code>sergei@sergei-VirtualBox:~/projects/mle-training/containerization_hw$ docker build -t containerization_hw1 .
  Sending build context to Docker daemon  55.07MB
  Step 1/10 : FROM ubuntu:20.04
   ---&gt; 597ce1600cf4
  Step 2/10 : ENV TZ=Europe/Kiev
   ---&gt; Using cache
   ---&gt; 944edf72d4bb
  Step 3/10 : RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime &amp;&amp; echo $TZ &gt; /etc/timezone
   ---&gt; Using cache
   ---&gt; 03911c47eb05
  Step 4/10 : RUN apt-get update &amp;&amp; apt-get install -y tzdata
   ---&gt; Using cache
   ---&gt; 6170fb2f3d5f
  Step 5/10 : WORKDIR $HOME/projects/mle-training/containerization_hw/models
   ---&gt; Using cache
   ---&gt; ab156cdcf7d7
  Step 6/10 : RUN apt-get update &amp;&amp;   apt-get -qq -y install git &amp;&amp;   git clone https://github.com/facebookresearch/Starspace.git
   ---&gt; Using cache
   ---&gt; 1b4fb2223dde
  Step 7/10 : WORKDIR $HOME/projects/mle-training/containerization_hw/models/Starspace
   ---&gt; Using cache
   ---&gt; f8b8d40646cc
  Step 8/10 : RUN apt-get -qq -y install make &amp;&amp;  apt-get -qq -y install build-essential &amp;&amp;   apt-get -qq -y install libboost-all-dev &amp;&amp;  make
   ---&gt; Using cache
   ---&gt; 3df610ec82f8
  Step 9/10 : RUN ./starspace train -trainFile ../../volume/starspace_input_file.txt -model modelSaveFile
   ---&gt; Running in 7bb5cbf2cf3d
  Arguments: 
  lr: 0.01
  dim: 100
  epoch: 5
  maxTrainTime: 8640000
  validationPatience: 10
  saveEveryEpoch: 0
  loss: hinge
  margin: 0.05
  similarity: cosine
  maxNegSamples: 10
  negSearchLimit: 50
  batchSize: 5
  thread: 10
  minCount: 1
  minCountLabel: 1
  label: __label__
  label: __label__
  ngrams: 1
  bucket: 2000000
  adagrad: 1
  trainMode: 0
  fileFormat: fastText
  normalizeText: 0
  dropoutLHS: 0
  dropoutRHS: 0
  useWeight: 0
  weightSep: :
  Start to initialize starspace model.
  Build dict from input file : ../../volume/starspace_input_file.txt
  Input file cannot be opened!
  The command '/bin/sh -c ./starspace train -trainFile ../../volume/starspace_input_file.txt -model modelSaveFile' returned a non-zero code: 1
  </code></pre>
  <p>What am I doing wrong?</p>