Tritlo / PropR

Genetic program repair using GHC
MIT License
30 stars 2 forks source link

Binary File Access #20

Open lapplislazuli opened 3 years ago

lapplislazuli commented 3 years ago

When I started to play with the docker-compose in #17, I first added the volume in read only like such:

version: '3.8'

services:
  ThreeFixes_Example:
    image: tritlo/endemic:latest
    volumes:
      - ./:/input:ro
    environment:
      REPAIR_TARGET: /input/ThreeFixes.hs
      LOG_LEVEL: "DEBUG"
    oom_kill_disable: true

That gives the following (interesting) Error

Attaching to examples_ThreeFixes_Example_1
ThreeFixes_Example_1  | Up to date
ThreeFixes_Example_1  | endemic: /input/ThreeFixes.hi: openBinaryFile: permission denied (Read-only file system)
examples_ThreeFixes_Example_1 exited with code 1

Which is weird to me. Can we use a Read-Only-BinaryFile ?

Tritlo commented 3 years ago

Hey Leo! We need write access as well, since we actually compile the programs. So when you run it on ThreeFixes.hs, it generates the ThreeFixes.hi as output, which has to be stored somewhere!

lapplislazuli commented 3 years ago

Ah this makes sense, so it is file-read-only but directory-read-write?