<p>Have a dockerized python script and using docker-compose for local development. Need to move it to GKE but unsure about which GCP services can be used for its persistent volume.</p>
<pre><code># docker-compose.yaml
version: &quot;3&quot;

services:
  python-obj-01:
    image: python-obj
    build:
      context: .
      dockerfile: dockerfile
    container_name: python-obj-01
    volumes:
      - ./data/inputs:/home/appuser/data/inputs
      - ./data/outputs:/home/appuser/data/outputs
      - ./data/model:/home/appuser/data/obj_detection
</code></pre>
<p>There are 3 mount points from my local machine:</p>
<ul>
<li>./data/input : Reads and process the input data</li>
<li>./data/output: Writes the results</li>
<li>./data/model :  Reads the models of input data</li>
</ul>
<p>In the python script, it will glob to find files from ./data/inputs, processes them, create sub-directory and files in ./data/output.</p>
<p>Besides Cloud Filestore, can Cloud Storage bucket able to fulfill the requirements? or other GCP services?</p>

jj pan
<blockquote>
<p>can Cloud Storage bucket able to fulfill the requirements?</p>
</blockquote>
<p>If you requirement is work with a volume like a filesystem the answer is <strong>NO</strong></p>
<p><strong>Why?</strong></p>
<p>Cloud Storage is an object-storage and can't be used as a normal filesytem.
It should be perfect to storage and read files, but in order to extract all the powerful and features from Cloud Storage, you need to rewrite your application to use <a href="https://googleapis.dev/python/storage/latest/index.html" rel="nofollow noreferrer">cloud storage api</a>, for example.</p>
<p>In <strong>GCP</strong> by default, the persistent storage is the <strong>compute engine persisten disks</strong>, you can also use some NFS service, like <a href="https://medium.com/faun/using-kubernetes-google-firestore-in-gke-to-orchestrate-scrapers-using-scrapy-pt-1-cdf7bb651341" rel="nofollow noreferrer">Firestore</a>.</p>
<p>The best solution depends of how your application works and how the importance for this data for you.</p>
<p>Here you can read more about <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/persistent-volumes" rel="nofollow noreferrer">volumes</a> in GCP.</p>
