File size: 590 Bytes
f9128f2
 
 
 
484be0a
f9128f2
506ffd9
484be0a
8484e70
506ffd9
f9128f2
 
e7aa27e
 
f7264f0
3c37f23
3e05c72
 
7d5656c
3e05c72
506ffd9
f6bdaf6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# ベースイメージを選択
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9

# 作業ディレクトリを設定
WORKDIR /my_codes

# Copy the current directory contents into the container at /app
COPY . /my_codes

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

RUN chmod -R 777 /my_codes/app

WORKDIR /my_codes/app

RUN mkdir CACHE && chmod -R 777 CACHE
ENV TRANSFORMERS_CACHE CACHE
ENV NUMBA_CACHE_DIR CACHE

# Run app.py when the container launches
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]