Initial commit
This commit is contained in:
32
Dockerfile
Executable file
32
Dockerfile
Executable file
@@ -0,0 +1,32 @@
|
||||
# Base image
|
||||
FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-devel
|
||||
|
||||
# Set timezone and working directory
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Asia/Seoul
|
||||
WORKDIR /opt/workspace
|
||||
|
||||
# Use a faster mirror for apt-get
|
||||
RUN sed -i 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
|
||||
|
||||
# Install system dependencies (including dependencies for Hugging Face login)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
vim \
|
||||
curl \
|
||||
&& apt-get clean
|
||||
|
||||
# Upgrade pip and install Python dependencies, including Hugging Face CLI
|
||||
COPY requirements.txt .
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install huggingface_hub && \
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Copy project files into the container
|
||||
COPY . .
|
||||
|
||||
# Set Python to output logs in real time
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Default command to run both uvicorn server and worker
|
||||
# CMD ["/bin/bash", "-c", "uvicorn main:app --host 0.0.0.0 --port 8000 & python /opt/workspace/worker.py"]
|
||||
Reference in New Issue
Block a user