Spaces:
Sleeping
Sleeping
FROM circulartextapp/lastread | |
# Define environment variables for user identification and configuration | |
ENV USER_ID="" | |
ENV USER_CONFIG="" | |
# Install Hugging Face dependencies | |
RUN pip install transformers datasets huggingface_hub | |
# Define additional user group for the application | |
RUN addgroup --system myappgroup | |
# Add user with unique identifier and assign to the group | |
ARG USER_ID=1000 | |
RUN adduser --system --group myappuser --uid ${USER_ID} user | |
# Set the working directory to /app | |
WORKDIR /app | |
# Copy the current directory contents into the container at /app | |
COPY . . | |
# Set appropriate permissions for the application directory | |
RUN chown -R user:myappgroup /app && chmod -R 775 /app | |
# Set environment variable for user configuration file (optional) | |
COPY user_config.json . | |
# Entrypoint script to personalize the environment and run the application | |
ENTRYPOINT ["/app/entrypoint.sh"] | |
# Expose Hugging Face space port (e.g., 7860) | |
EXPOSE 7860 | |
# Example CMD for Hugging Face Space application (modify as needed) | |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"] | |