TRMT's picture
Update Dockerfile
ade84bd
raw
history blame
659 Bytes
# ベースイメージを選択
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9
# 作業ディレクトリを設定
WORKDIR /my_codes
RUN mkdir CACHE && chmod -R 777 CACHE
ENV TRANSFORMERS_CACHE CACHE
# 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
WORKDIR /app
# Make port 80 available to the world outside this container
EXPOSE 80
# Run app.py when the container launches
#CMD ["uvicorn", "main", "--host", "0.0.0.0", "--port", "80"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]