Can't execute local .py script on pycharm when using Docker interpreter

My host machine is Windows. I’m degbugging a python script requiring some libraries only available on linux… I’ve already done the following steps:

  1. build a python3.6 image and install the required libraries. Here is the Dockerfile:
# Use Python 3.6 base image
FROM python:3.6

# Set environment variables
ENV PYTHONUNBUFFERED=1

# Install system dependencies
RUN apt-get update && apt-get install -y \
    libjpeg-dev \
    zlib1g-dev \
    && rm -rf /var/lib/apt/lists/*

# Install Python packages
RUN pip install --no-cache-dir \
    range-coder \
    tensorflow==1.14 \
    tensorflow-compression==1.2

# Set the working directory in the container
WORKDIR /app
  1. On pycharm I’ve connected successfully to the docker kernel leaving the item Path mapping unset and empty. (According to the official guidance it is also left unset so I doubt if this explains my problem)
  2. Here comes the problem: After configurating my remote docker python kernel. I couldn’t run a local .py script directly as it reported FileNotFoundError: [Errno 2] No such file or directory: 'E:/local/path/to/your/file'
    However, I’ve tried other means to interact with my local path. for example on python console, I ran a code which creates a .txt file locally on my computer. It turned out working successfully.
    I wonder if any addtional work could be done about this.

Okay I’ve finally figured it out myself and I want to share with your guys a critical step that the official guidance seems to omit(maybe only in my case it’s omitted)

So the reason why I can run a python console on pycharm to interact with my local directory after connecting to the docker interpreter is that, it has automatically mapped my local path to the destination path /opt/project in my container and shifted to that path when executing local .py script.
To testify my guess I created a test.py file in the local directory which prints ‘hello world’ and current workdir. Then on python console inside pycharm I ran:

import os
os.system('python ./test.py')

As it printed ‘hello world’ and /opt/project my guess is testified.
Let’s go back to my original problem that I can’t run or debug a local script by clicking the run or dubug button. As it always printed FileNotFoundError: [Errno 2] No such file or directory: 'E:/local/path/to/your/file'. A signal it conveyed is that the local dir E:/local/path/to/your/file hasn’t mapped to the container’s path /opt/project where the volume is binded. So open the interpreter setting and go to the item Path mapping, add a mapping link, set the Local path as E:/local/path/to/your/file and Remote Path as /opt/project. So that next time you run a local script, the kernel will convert the local path E:/local/path/to/your/file/script.py to /opt/project/script.py and then execute it.