Whisper_DATN / Dockerfile
Bui
Update Dockerfile
0a8b616 verified
raw
history blame contribute delete
No virus
684 Bytes
# Sử dụng base image
FROM python:3.8-slim
# Thiết lập thư mục làm việc
WORKDIR /app
# Sao chép file requirements.txt vào container
COPY requirements.txt .
# Cài đặt các gói cần thiết
RUN pip install --no-cache-dir -r requirements.txt
# Cài đặt PyTorch
RUN pip install torch
# Sao chép toàn bộ mã nguồn vào container
COPY . .
# Tạo thư mục cache và thiết lập quyền truy cập
RUN mkdir -p /app/cache && \
chmod -R 777 /app/cache
# Thiết lập biến môi trường TRANSFORMERS_CACHE
ENV TRANSFORMERS_CACHE=/app/cache
# Mở cổng mà ứng dụng sẽ chạy
EXPOSE 7860
# Chạy ứng dụng
CMD ["python", "app.py"]