2023-10-15 17:14:15 +00:00
|
|
|
# Use an official Python runtime as a parent image
|
2024-06-19 13:06:23 +00:00
|
|
|
FROM huggingface/transformers-pytorch-gpu:latest
|
2023-10-14 15:36:12 +00:00
|
|
|
|
2023-10-15 17:14:15 +00:00
|
|
|
# Set the working directory in the container to /app
|
|
|
|
WORKDIR /app
|
2023-10-01 11:46:51 +00:00
|
|
|
|
2023-10-15 17:14:15 +00:00
|
|
|
# Copy the current directory contents into the container at /app
|
2024-06-28 17:59:43 +00:00
|
|
|
ADD . /app
|
2023-10-01 11:46:51 +00:00
|
|
|
|
2023-10-15 17:14:15 +00:00
|
|
|
# Install any needed packages specified in requirements.txt
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
2023-10-01 11:46:51 +00:00
|
|
|
|
2024-06-18 17:42:11 +00:00
|
|
|
# Make port 8547 available to the world outside this container
|
2023-10-18 10:01:15 +00:00
|
|
|
EXPOSE 8547
|
2023-10-01 11:46:51 +00:00
|
|
|
|
2023-10-15 17:14:15 +00:00
|
|
|
# Run app.py when the container launches
|
2023-10-18 10:01:15 +00:00
|
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8547" ]
|