CoolFace
Apppublic

amchugh/Second_MCP_Server

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile25 linesDownload Raw Back to root
1FROM python:3.10-slim2 3# Create a new user - myuser4RUN useradd -ms /bin/bash myuser5 6# Switch to that user7USER myuser8 9# Create a .cache directory for Hugging Face transformers10# This is necessary to avoid permission issues when running the container as a non-root user,11# especially when using Hugging Face libraries.12# The directory will be used to store cached files, models, etc.13# The permissions are set to allow read/write access for the user.14RUN mkdir -p /home/myuser/.cache && chmod -R 755 /home/myuser/.cache15 16ADD requirements.txt .17 18RUN pip install -r requirements.txt19 20ADD my_server.py .21 22EXPOSE 800023 24CMD ["python", "my_server.py"]25