Th3BossC commited on
Commit
68c70b0
·
1 Parent(s): 0230df5

fixing dockerfile for write issues

Browse files
Files changed (2) hide show
  1. Dockerfile +10 -1
  2. TranscriptApi/__init__.py +0 -1
Dockerfile CHANGED
@@ -8,7 +8,16 @@ WORKDIR /code
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
11
 
12
- COPY . .
 
 
 
 
 
 
 
 
13
 
14
  CMD ["python", "app.py"]
 
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
+ RUN apt update && apt install -y ffmpeg
12
 
13
+ RUN useradd -m -u 1000 user
14
+ USER user
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
+
18
+ WORKDIR $HOME/app
19
+
20
+
21
+ COPY --chown=user . $HOME/app
22
 
23
  CMD ["python", "app.py"]
TranscriptApi/__init__.py CHANGED
@@ -7,7 +7,6 @@ db = SQLAlchemy()
7
  SQLALCHEMY_DATABASE_URI = 'sqlite:///site.db'
8
 
9
  def create_app():
10
- os.environ['TRANSFORMERS_CACHE'] = './cache'
11
  app = Flask(__name__)
12
  CORS(app)
13
  app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'
 
7
  SQLALCHEMY_DATABASE_URI = 'sqlite:///site.db'
8
 
9
  def create_app():
 
10
  app = Flask(__name__)
11
  CORS(app)
12
  app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///site.db'